<!DOCTYPE html>
<html lang="en" class="svg no-js">
<head>
    <meta charset="utf-8" />
    <!--[if IE ]>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="Language" content="en">

    <title>MySQL :: MySQL 8.0 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program</title>
    <link rel="stylesheet" media="all" href="css/main-20190125.min.css" />
            <link rel="stylesheet" media="all" href="css/docs-20190125.min.css" />
    
    
    <link rel="stylesheet" media="print" href="css/print-20190125.min.css" />

    
    
    
    
            <link rel="contents" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="start" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="prev" href="mysqlcheck.html" title="4.5.3 mysqlcheck &mdash; A Table Maintenance Program" />
<link rel="next" href="mysqlimport.html?ff=nopfpls" title="4.5.5 mysqlimport &mdash; A Data Import Program" />
<link rel="up" href="programs-client.html" title="4.5 MySQL Client Programs" />

    
    <link rel="shortcut icon" href="favicon.ico" />
    <script>(function(H){ H.className=H.className.replace(/\bno-js\b/,'js') })(document.documentElement)</script>
    <script src="js/site-20181120.min.js"></script>

    
    
    
    <!--[if lt IE 9]>
        <script src="https://labs.mysql.com/common/js/polyfills/html5shiv-printshiv-3.7.2.min.js"></script>
        <script src="https://labs.mysql.com/common/js/polyfills/respond-1.4.2.min.js"></script>
    <![endif]-->
        <!--[if IE 9]>
        <style>#docs-sidebar-toc { box-sizing: content-box; }</style>
    <![endif]-->
    </head>

<body class="no-sidebar full-page dev">
<div class="page-wrapper">
    <header>

                        <a href="https://dev.mysql.com/" aria-label="Home" title="MySQL" id="l1-home-link"></a>
        
        <div id="l1-nav-container">
            <div id="l1-line1">
                <div id="l1-auth-links">
                    <a href="https://www.mysql.com/about/contact/"><b>Contact MySQL</b></a>
                    <span id="l1-contact-separator">&nbsp;|&nbsp;</span>
                    <span id="l1-contact-separator-br"><br /></span>
                                             <a href="https://dev.mysql.com/auth/login/?dest=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F8.0%2Fen%2Fmysqldump.html">Login</a> &nbsp;|&nbsp;
                         <a href="https://dev.mysql.com/auth/register/">Register</a>
                                    </div>
                <div id="l1-lhs">
                    <div id="l1-slogan">
                        The world's most popular open source database
                    </div>
                    <div id="l1-search-box">
                        <form id="l1-search-form" method="get" action="https://www.oracle.com/search/results">
                        <input type="hidden" name="cat" value="mysql" />
                        <input type="hidden" name="Ntk" value="SI-ALL5" />
                        <input id="l1-search-input" type="search" class="icon-search" placeholder="Search" aria-label="Search" name="Ntt" />
                        </form>
                    </div>
                </div>
            </div>
            <div id="l1-line2">
                <div class="social-icons">
                    <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook"></span></a>
                    <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter"></span></a>
                    <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin"></span></a>
                    <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube"></span></a>
                </div>
                <ul id="l1-nav">
                    <li>
                        <a href="https://www.mysql.com/"><!-- <span class="icon-sakila"></span>  -->MySQL.com</a>
                    </li><li>
                        <a href="https://www.mysql.com/downloads/"><!-- <span class="icon-download-thin"></span>  -->Downloads</a>
                    </li><li class="active">
                        <a href="/doc/"><!-- <span class="icon-books"></span>  -->Documentation</a>
                    </li><li>
                        <a href="/"><!-- <span class="icon-code"></span>  -->Developer Zone</a>
                    </li>                </ul>
            </div>
        </div>
        <div id="sub-header">
            <div id="l2-nav-container">
                <div id="l2-nav-toggle">
                    <span class="icon-three-bars"></span>
                </div>
                                                                                        <a class="button nav-button-3" href="/"><span class="icon-code"></span> Developer Zone</a>
                                                                                                                                    <a class="button nav-button-2" href="https://www.mysql.com/downloads/"><span class="icon-download-thin"></span> Downloads</a>
                                                                                                <a class="button nav-button-1" href="https://www.mysql.com/"><span class="icon-sakila"></span> MySQL.com</a>
                                                                        <div id="l2-search-toggle">
                    <span class="icon-search"></span>
                </div>
                <div id="l2-site-icon">
                                                                                                                                                                                                    <span class="icon-books"></span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </div>
                <div id="l1-section-title">
                    <span id="l1-section-label">
                        <a href="/doc/">Documentation</a>
                    </span>
                </div>
                <nav>
                    

<ul id="l2-nav">
            	<li class="active"><a class="active " href="/doc/refman/en/">MySQL Server</a>
    			</li>
	        	<li class=""><a  href="/doc/index-enterprise.html">MySQL Enterprise</a>
    			</li>
	        	<li class=""><a  href="/doc/workbench/en/">Workbench</a>
    			</li>
	        	<li class=""><a  href="/doc/en/mysql-innodb-cluster-userguide.html">InnoDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-cluster.html">MySQL NDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-connectors.html">Connectors</a>
    			</li>
	        	<li class=" last"><a  href="/doc/index-other.html">More</a>
    			</li>
	                        <li class="other-section"><a href="https://www.mysql.com/">MySQL.com</a></li>
                            <li class="other-section"><a href="https://www.mysql.com/downloads/">Downloads</a></li>
                                        <li class="other-section"><a href="/">Developer Zone</a></li>
            </ul>
                </nav>
            </div>
            <div id="l3-search-container"></div>
            <div id="top-orange"><span id="section-nav">Section Menu: &nbsp; </span></div>
        </div>
    </header>
        <div id="page">
                        <div role="main" id="main">

            
                
            
<div>
    <div id="docs-sidebar-toc" class="">
    <div id="docs-toc-inner">
        <div class="docs-sidebar-header" id="docs-nav-header">
            <a class="docs-show-hide-nav" id="docs-hide-nav" href="" title="Hide Sidebar" aria-label="Hide Sidebar"><span class="icon-arrow-small-left"></span></a>
            <div class="docs-nav-links">
                                    
    <a href="mysqlcheck.html"
        aria-label="Previous" title="Previous: mysqlcheck — A Table Maintenance Program"><span
        class="icon-chevron-left"></span></a>
<a href="index.html" aria-label="Start" title="Start"><span class="icon-book-open"></span></a>
        <a aria-label="Up" href="programs-client.html" title="Up: MySQL Client Programs"><span class="icon-chevron-up"></span></a>
    <a href="mysqlimport.html" aria-label="Next"
        title="Next: mysqlimport — A Data Import Program"><span
        class="icon-chevron-right"></span></a>
                            </div>
        </div>
                    
<div id="docs-sidebar-search-container">
    <div id="docs-sidebar-search-box">
        <form method="get" action="/mysql-manual/search-page">
            <input type="hidden" name="d" id="d" value="201" />
            <input type="hidden" name="p" id="p" value="1" />
            <input type="text" name="keyword" id="q" title="Search this Manual"
                value=""
                style="color: #bbb;"
                onfocus=""
                onblur="" />

            <button class="docs-sidebar-search-btn" aria-label="Search" title="Search" type="submit">
                <span class="icon-search"></span>
            </button>
        </form>
    </div>
</div>
                <div class="docs-sidebar-nav">
            <a class="docs-icon-home" href="/doc/"><span class="icon-home"></span>Documentation Home</a><hr />
            <div class="docs-sidebar-mtitle">MySQL 8.0 Reference Manual</div>
            <nav class="doctoc" id="doc-201">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="preface.html">Preface and Legal Notices</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="introduction.html">General Information</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="installing.html">Installing and Upgrading MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="tutorial.html">Tutorial</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs.html">MySQL Programs</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="programs-overview.html">Overview of MySQL Programs</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-using.html">Using MySQL Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="invoking-programs.html">Invoking MySQL Programs</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="program-options.html">Specifying Program Options</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="command-line-options.html">Using Options on the Command Line</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-files.html">Using Option Files</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-file-options.html">Command-Line Options that Affect Option-File Handling</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-modifiers.html">Program Option Modifiers</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="program-variables.html">Using Options to Set Program Variables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="option-defaults-equals.html">Option Defaults, Options Expecting Values, and the = Sign</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connection-options.html">Command Options for Connecting to the Server</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connecting.html">Connecting to the MySQL Server Using Command Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connecting-using-uri-or-key-value-pairs.html">Connecting to the Server Using URI-Like Strings or Key-Value Pairs</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="connection-compression-control.html">Connection Compression Control</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="setting-environment-variables.html">Setting Environment Variables</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-server.html">MySQL Server and Server-Startup Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqld.html">mysqld — The MySQL Server</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqld-safe.html">mysqld_safe — MySQL Server Startup Script</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-server.html">mysql.server — MySQL Server Startup Script</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqld-multi.html">mysqld_multi — Manage Multiple MySQL Servers</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-installation.html">MySQL Installation-Related Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="comp-err.html">comp_err — Compile MySQL Error Message File</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-secure-installation.html">mysql_secure_installation — Improve MySQL Installation Security</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-ssl-rsa-setup.html">mysql_ssl_rsa_setup — Create SSL/RSA Files</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-tzinfo-to-sql.html">mysql_tzinfo_to_sql — Load the Time Zone Tables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-upgrade.html">mysql_upgrade — Check and Upgrade MySQL Tables</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-client.html">MySQL Client Programs</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql.html">mysql — The MySQL Command-Line Client</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-command-options.html">mysql Client Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-commands.html">mysql Client Commands</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-logging.html">mysql Client Logging</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-server-side-help.html">mysql Client Server-Side Help</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-batch-commands.html">Executing SQL Statements from a Text File</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-tips.html">mysql Client Tips</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqladmin.html">mysqladmin — Client for Administering a MySQL Server</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlcheck.html">mysqlcheck — A Table Maintenance Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link current"><a href="mysqldump.html">mysqldump — A Database Backup Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlimport.html">mysqlimport — A Data Import Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlpump.html">mysqlpump — A Database Backup Program</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlshow.html">mysqlshow — Display Database, Table, and Column Information</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlslap.html">mysqlslap — Load Emulation Client</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-admin-utils.html">MySQL Administrative and Utility Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="ibd2sdi.html">ibd2sdi — InnoDB Tablespace SDI Extraction Utility</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="innochecksum.html">innochecksum — Offline InnoDB File Checksum Utility</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisam-ftdump.html">myisam_ftdump — Display Full-Text Index information</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="myisamchk.html">myisamchk — MyISAM Table-Maintenance Utility</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-general-options.html">myisamchk General Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-check-options.html">myisamchk Check Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-repair-options.html">myisamchk Repair Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-other-options.html">Other myisamchk Options</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-table-info.html">Obtaining Table Information with myisamchk</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamchk-memory.html">myisamchk Memory Usage</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisamlog.html">myisamlog — Display MyISAM Log File Contents</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="myisampack.html">myisampack — Generate Compressed, Read-Only MyISAM Tables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-config-editor.html">mysql_config_editor — MySQL Configuration Utility</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog.html">mysqlbinlog — Utility for Processing Binary Log Files</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-hexdump.html">mysqlbinlog Hex Dump Format</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-row-events.html">mysqlbinlog Row Event Display</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-backup.html">Using mysqlbinlog to Back Up Binary Log Files</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqlbinlog-server-id.html">Specifying the mysqlbinlog Server ID</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysqldumpslow.html">mysqldumpslow — Summarize Slow Query Log Files</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-development.html">MySQL Program Development Utilities</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-config.html">mysql_config — Display Options for Compiling Clients</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="my-print-defaults.html">my_print_defaults — Display Options from Option Files</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs-miscellaneous.html">Miscellaneous Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="lz4-decompress.html">lz4_decompress — Decompress mysqlpump LZ4-Compressed Output</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="perror.html">perror — Display MySQL Error Message Information</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="zlib-decompress.html">zlib_decompress — Decompress mysqlpump ZLIB-Compressed Output</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="environment-variables.html">MySQL Environment Variables</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="server-administration.html">MySQL Server Administration</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="security.html">Security</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="backup-and-recovery.html">Backup and Recovery</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="optimization.html">Optimization</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="language-structure.html">Language Structure</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="charset.html">Character Sets, Collations, Unicode</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-types.html">Data Types</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="functions.html">Functions and Operators</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax.html">SQL Statement Syntax</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-dictionary.html">MySQL Data Dictionary</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="innodb-storage-engine.html">The InnoDB Storage Engine</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="storage-engines.html">Alternative Storage Engines</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="replication.html">Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="group-replication.html">Group Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-shell-userguide.html">MySQL Shell</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="document-store.html">Using MySQL as a Document Store</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-innodb-cluster-userguide.html">InnoDB Cluster</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-cluster.html">MySQL NDB Cluster 8.0</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="partitioning.html">Partitioning</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="stored-objects.html">Stored Objects</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="information-schema.html">INFORMATION_SCHEMA Tables</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="performance-schema.html">MySQL Performance Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sys-schema.html">MySQL sys Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="connectors-apis.html">Connectors and APIs</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="extending-mysql.html">Extending MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-enterprise.html">MySQL Enterprise Edition</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="workbench.html">MySQL Workbench</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="faqs.html">MySQL 8.0 Frequently Asked Questions</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="error-handling.html">Errors, Error Codes, and Common Problems</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="restrictions.html">Restrictions and Limits</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="indexes.html">Indexes</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="glossary.html">MySQL Glossary</a></div></div>                    </li>
        </ul>
                            </nav>
        </div>

        
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian open">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian open">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>

        <br /><span id="wkr"><br /></span>
    </div>
    </div>

    <div id="docs-main" class="has-toc">
    <div id="docs-main-inner">

                <div class="right" id="docs-version-nav">
            <a href="" id="docs-version-nav-toggle">version 8.0
            <span class="icon-chevron-down"></span></a>
            <div id="docs-version-list">
                                                                                            <a                         href="/doc/refman/5.7/en/mysqldump.html">
                        5.7
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.6/en/mysqldump.html">
                        5.6
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.5/en/mysqldump.html">
                        5.5
                                            </a><br />
                                                                        <div id="docs-version-nav-lang">
                                                                                                                                                    <a                                     href="/doc/refman/5.6/ja/mysqldump.html">
                                    5.6&nbsp;
                                                                            Japanese
                                                                    </a><br />
                                                                                            </div>
                            </div>
        </div>
        
        <div id="docs-show-nav" class="left hidden" style="margin-right: 15px;">
            <a class="docs-show-hide-nav" href="" aria-label="Show Sidebar"
                title="Show Sidebar"><span class="icon-arrow-small-right"></span></a>
        </div>

                        <div id="docs-breadcrumbs">
            <a href="/doc/refman/8.0/en/">MySQL 8.0 Reference Manual</a> &nbsp;/&nbsp;
                            <span id="breadcrumbs-link"><a href="" id="show-breadcrumbs">...</a> &nbsp;/&nbsp;</span>
                <span class="hidden" id="hidden-breadcrumbs">
                                                        <a href="programs.html">MySQL Programs</a> &nbsp;/&nbsp;
                                                            <a href="programs-client.html">MySQL Client Programs</a> &nbsp;/&nbsp;
                                                                                        </span>
                                        mysqldump — A Database Backup Program
                                    </div>
        
        <div id="docs-body">
        
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="mysqldump"></a>4.5.4 <span class="command"><strong>mysqldump</strong></span> — A Database Backup Program</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm139663286668224"></a><a class="indexterm" name="idm139663286667280"></a><a class="indexterm" name="idm139663286665920"></a><a class="indexterm" name="idm139663286664560"></a><a class="indexterm" name="idm139663286663200"></a><p>
        The <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> client utility performs
        <a class="link" href="glossary.html#glos_logical_backup" title="logical backup">logical backups</a>,
        producing a set of SQL statements that can be executed to
        reproduce the original database object definitions and table
        data. It dumps one or more MySQL databases for backup or
        transfer to another SQL server. The <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>
        command can also generate output in CSV, other delimited text,
        or XML format.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-performance" title="Performance and Scalability Considerations">Performance and Scalability Considerations</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-syntax" title="Invocation Syntax">Invocation Syntax</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-option-summary" title="Option Syntax - Alphabetical Summary">Option Syntax - Alphabetical Summary</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-connection-options" title="Connection Options">Connection Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-option-file-options" title="Option-File Options">Option-File Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-ddl-options" title="DDL Options">DDL Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-debug-options" title="Debug Options">Debug Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-help-options" title="Help Options">Help Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-i18n-options" title="Internationalization Options">Internationalization Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-replication-options" title="Replication Options">Replication Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-format-options" title="Format Options">Format Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-filter-options" title="Filtering Options">Filtering Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-performance-options" title="Performance Options">Performance Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-transaction-options" title="Transactional Options">Transactional Options</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-option-groups" title="Option Groups">Option Groups</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-option-examples" title="Examples">Examples</a></p></li><li class="listitem"><p><a class="xref" href="mysqldump.html#mysqldump-restrictions" title="Restrictions">Restrictions</a></p></li></ul>
</div>
<p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> requires at least the
        <a class="link" href="privileges-provided.html#priv_select"><code class="literal">SELECT</code></a> privilege for dumped
        tables, <a class="link" href="privileges-provided.html#priv_show-view"><code class="literal">SHOW VIEW</code></a> for dumped
        views, <a class="link" href="privileges-provided.html#priv_trigger"><code class="literal">TRIGGER</code></a> for dumped
        triggers, and <a class="link" href="privileges-provided.html#priv_lock-tables"><code class="literal">LOCK TABLES</code></a> if the
        <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a> option is
        not used. Certain options might require other privileges as
        noted in the option descriptions.
      </p><p>
        To reload a dump file, you must have the privileges required to
        execute the statements that it contains, such as the appropriate
        <code class="literal">CREATE</code> privileges for objects created by
        those statements.
      </p><p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> output can include
        <a class="link" href="alter-database.html" title="13.1.2 ALTER DATABASE Syntax"><code class="literal">ALTER DATABASE</code></a> statements that
        change the database collation. These may be used when dumping
        stored programs to preserve their character encodings. To reload
        a dump file containing such statements, the
        <code class="literal">ALTER</code> privilege for the affected database is
        required.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          A dump made using PowerShell on Windows with output
          redirection creates a file that has UTF-16 encoding:
        </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump [options] &gt; dump.sql</code></pre><p>
          However, UTF-16 is not permitted as a connection character set
          (see
          <a class="xref" href="charset-connection.html#charset-connection-impermissible-client-charset" title="Impermissible Client Character Sets">Impermissible Client Character Sets</a>),
          so the dump file will not load correctly. To work around this
          issue, use the <code class="option">--result-file</code> option, which
          creates the output in ASCII format:
        </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump [options] --result-file=dump.sql</code></pre>
</div>
<h4><a name="mysqldump-performance"></a>Performance and Scalability Considerations</h4>
<p>
        <code class="literal">mysqldump</code> advantages include the convenience
        and flexibility of viewing or even editing the output before
        restoring. You can clone databases for development and DBA work,
        or produce slight variations of an existing database for
        testing. It is not intended as a fast or scalable solution for
        backing up substantial amounts of data. With large data sizes,
        even if the backup step takes a reasonable time, restoring the
        data can be very slow because replaying the SQL statements
        involves disk I/O for insertion, index creation, and so on.
      </p><p>
        For large-scale backup and restore, a
        <a class="link" href="glossary.html#glos_physical" title="physical">physical</a> backup is more
        appropriate, to copy the data files in their original format
        that can be restored quickly:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If your tables are primarily <code class="literal">InnoDB</code>
            tables, or if you have a mix of <code class="literal">InnoDB</code>
            and <code class="literal">MyISAM</code> tables, consider using the
            <span class="command"><strong>mysqlbackup</strong></span> command of the MySQL
            Enterprise Backup product. (Available as part of the
            Enterprise subscription.) It provides the best performance
            for <code class="literal">InnoDB</code> backups with minimal
            disruption; it can also back up tables from
            <code class="literal">MyISAM</code> and other storage engines; and it
            provides a number of convenient options to accommodate
            different backup scenarios. See
            <a class="xref" href="mysql-enterprise-backup.html" title="30.2 MySQL Enterprise Backup Overview">Section 30.2, “MySQL Enterprise Backup Overview”</a>.
</p></li></ul>
</div>
<p>
        

        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> can retrieve and dump table
        contents row by row, or it can retrieve the entire content from
        a table and buffer it in memory before dumping it. Buffering in
        memory can be a problem if you are dumping large tables. To dump
        tables row by row, use the
        <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--quick</code></a> option (or
        <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a>, which enables
        <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--quick</code></a>). The
        <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> option (and hence
        <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--quick</code></a>) is enabled by
        default, so to enable memory buffering, use
        <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--skip-quick</code></a>.
      </p><p>
        If you are using a recent version of
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to generate a dump to be reloaded
        into a very old MySQL server, use the
        <a class="link" href="mysqldump.html#option_mysqldump_skip-opt"><code class="option">--skip-opt</code></a> option instead of
        the <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> or
        <a class="link" href="mysqldump.html#option_mysqldump_extended-insert"><code class="option">--extended-insert</code></a> option.
      </p><p>
        For additional information about <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>,
        see <a class="xref" href="using-mysqldump.html" title="7.4 Using mysqldump for Backups">Section 7.4, “Using mysqldump for Backups”</a>.
</p>
<h4><a name="mysqldump-syntax"></a>Invocation Syntax</h4>
<p>
        There are in general three ways to use
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>—in order to dump a set of one
        or more tables, a set of one or more complete databases, or an
        entire MySQL server—as shown here:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqldump [<em class="replaceable">options</em>] <em class="replaceable">db_name</em> [<em class="replaceable">tbl_name</em> ...]
shell&gt; mysqldump [<em class="replaceable">options</em>] --databases <em class="replaceable">db_name</em> ...
shell&gt; mysqldump [<em class="replaceable">options</em>] --all-databases</code></pre><p>
        To dump entire databases, do not name any tables following
        <em class="replaceable"><code>db_name</code></em>, or use the
        <a class="link" href="mysqldump.html#option_mysqldump_databases"><code class="option">--databases</code></a> or
        <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option.
      </p><p>
        To see a list of the options your version of
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> supports, issue the command
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump --help</strong></span></a>.
</p>
<h4><a name="mysqldump-option-summary"></a>Option Syntax - Alphabetical Summary</h4>
<p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> supports the following options,
        which can be specified on the command line or in the
        <code class="literal">[mysqldump]</code> and <code class="literal">[client]</code>
        groups of an option file. For information about option files
        used by MySQL programs, see <a class="xref" href="option-files.html" title="4.2.2.2 Using Option Files">Section 4.2.2.2, “Using Option Files”</a>.
</p>
<div class="table">
<a name="idm139663286572112"></a><p class="title"><b>Table 4.13 mysqldump Options</b></p>
<div class="table-contents">
<table frame="box" rules="all" summary="Command-line options available for mysqldump."><col width="27%"><col width="50%"><col width="11%"><col width="11%"><thead><tr><th scope="col">Option Name</th>
<th scope="col">Description</th>
<th scope="col">Introduced</th>
<th scope="col">Removed</th>
</tr></thead><tbody><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_add-drop-database">--add-drop-database</a></td>
<td>Add DROP DATABASE statement before each CREATE DATABASE statement</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_add-drop-table">--add-drop-table</a></td>
<td>Add DROP TABLE statement before each CREATE TABLE statement</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_add-drop-trigger">--add-drop-trigger</a></td>
<td>Add DROP TRIGGER statement before each CREATE TRIGGER statement</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_add-locks">--add-locks</a></td>
<td>Surround each table dump with LOCK TABLES and UNLOCK TABLES statements</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_all-databases">--all-databases</a></td>
<td>Dump all tables in all databases</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_allow-keywords">--allow-keywords</a></td>
<td>Allow creation of column names that are keywords</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_apply-slave-statements">--apply-slave-statements</a></td>
<td>Include STOP SLAVE prior to CHANGE MASTER statement and START SLAVE at end of output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_bind-address">--bind-address</a></td>
<td>Use specified network interface to connect to MySQL Server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_character-sets-dir">--character-sets-dir</a></td>
<td>Directory where character sets are installed</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_column-statistics">--column-statistics</a></td>
<td>Write ANALYZE TABLE statements to generate statistics histograms</td>
<td>8.0.2</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_comments">--comments</a></td>
<td>Add comments to dump file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_compact">--compact</a></td>
<td>Produce more compact output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_compatible">--compatible</a></td>
<td>Produce output that is more compatible with other database systems or with older MySQL servers</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_complete-insert">--complete-insert</a></td>
<td>Use complete INSERT statements that include column names</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_compress">--compress</a></td>
<td>Compress all information sent between client and server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_create-options">--create-options</a></td>
<td>Include all MySQL-specific table options in CREATE TABLE statements</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_databases">--databases</a></td>
<td>Interpret all name arguments as database names</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_debug">--debug</a></td>
<td>Write debugging log</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_debug-check">--debug-check</a></td>
<td>Print debugging information when program exits</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_debug-info">--debug-info</a></td>
<td>Print debugging information, memory, and CPU statistics when program exits</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_default-auth">--default-auth</a></td>
<td>Authentication plugin to use</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_default-character-set">--default-character-set</a></td>
<td>Specify default character set</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_defaults-extra-file">--defaults-extra-file</a></td>
<td>Read named option file in addition to usual option files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_defaults-file">--defaults-file</a></td>
<td>Read only named option file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_defaults-group-suffix">--defaults-group-suffix</a></td>
<td>Option group suffix value</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_delete-master-logs">--delete-master-logs</a></td>
<td>On a master replication server, delete the binary logs after performing the dump operation</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_disable-keys">--disable-keys</a></td>
<td>For each table, surround INSERT statements with statements to disable and enable keys</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_dump-date">--dump-date</a></td>
<td>Include dump date as "Dump completed on" comment if --comments is given</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_dump-slave">--dump-slave</a></td>
<td>Include CHANGE MASTER statement that lists binary log coordinates of slave's master</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_enable-cleartext-plugin">--enable-cleartext-plugin</a></td>
<td>Enable cleartext authentication plugin</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_events">--events</a></td>
<td>Dump events from dumped databases</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_extended-insert">--extended-insert</a></td>
<td>Use multiple-row INSERT syntax</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_fields">--fields-enclosed-by</a></td>
<td>This option is used with the --tab option and has the same meaning as the corresponding clause for LOAD DATA</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_fields">--fields-escaped-by</a></td>
<td>This option is used with the --tab option and has the same meaning as the corresponding clause for LOAD DATA</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_fields">--fields-optionally-enclosed-by</a></td>
<td>This option is used with the --tab option and has the same meaning as the corresponding clause for LOAD DATA</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_fields">--fields-terminated-by</a></td>
<td>This option is used with the --tab option and has the same meaning as the corresponding clause for LOAD DATA</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_flush-logs">--flush-logs</a></td>
<td>Flush MySQL server log files before starting dump</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_flush-privileges">--flush-privileges</a></td>
<td>Emit a FLUSH PRIVILEGES statement after dumping mysql database</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_force">--force</a></td>
<td>Continue even if an SQL error occurs during a table dump</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_get-server-public-key">--get-server-public-key</a></td>
<td>Request RSA public key from server</td>
<td>8.0.3</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_help">--help</a></td>
<td>Display help message and exit</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_hex-blob">--hex-blob</a></td>
<td>Dump binary columns using hexadecimal notation</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_host">--host</a></td>
<td>Host to connect to (IP address or hostname)</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ignore-error">--ignore-error</a></td>
<td>Ignore specified errors</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ignore-table">--ignore-table</a></td>
<td>Do not dump given table</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_include-master-host-port">--include-master-host-port</a></td>
<td>Include MASTER_HOST/MASTER_PORT options in CHANGE MASTER statement produced with --dump-slave</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_insert-ignore">--insert-ignore</a></td>
<td>Write INSERT IGNORE rather than INSERT statements</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_lines-terminated-by">--lines-terminated-by</a></td>
<td>This option is used with the --tab option and has the same meaning as the corresponding clause for LOAD DATA</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_lock-all-tables">--lock-all-tables</a></td>
<td>Lock all tables across all databases</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_lock-tables">--lock-tables</a></td>
<td>Lock all tables before dumping them</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_log-error">--log-error</a></td>
<td>Append warnings and errors to named file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_login-path">--login-path</a></td>
<td>Read login path options from .mylogin.cnf</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_master-data">--master-data</a></td>
<td>Write the binary log file name and position to the output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_max-allowed-packet">--max-allowed-packet</a></td>
<td>Maximum packet length to send to or receive from server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_net-buffer-length">--net-buffer-length</a></td>
<td>Buffer size for TCP/IP and socket communication</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_network-timeout">--network-timeout</a></td>
<td>Increase network timeouts to permit larger table dumps</td>
<td>8.0.1</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_no-autocommit">--no-autocommit</a></td>
<td>Enclose the INSERT statements for each dumped table within SET autocommit = 0 and COMMIT statements</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_no-create-db">--no-create-db</a></td>
<td>Do not write CREATE DATABASE statements</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_no-create-info">--no-create-info</a></td>
<td>Do not write CREATE TABLE statements that re-create each dumped table</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_no-data">--no-data</a></td>
<td>Do not dump table contents</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_no-defaults">--no-defaults</a></td>
<td>Read no option files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_no-set-names">--no-set-names</a></td>
<td>Same as --skip-set-charset</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_no-tablespaces">--no-tablespaces</a></td>
<td>Do not write any CREATE LOGFILE GROUP or CREATE TABLESPACE statements in output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_opt">--opt</a></td>
<td>Shorthand for --add-drop-table --add-locks --create-options --disable-keys --extended-insert --lock-tables --quick --set-charset.</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_order-by-primary">--order-by-primary</a></td>
<td>Dump each table's rows sorted by its primary key, or by its first unique index</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_password">--password</a></td>
<td>Password to use when connecting to server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_pipe">--pipe</a></td>
<td>Connect to server using named pipe (Windows only)</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_plugin-dir">--plugin-dir</a></td>
<td>Directory where plugins are installed</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_port">--port</a></td>
<td>TCP/IP port number for connection</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_print-defaults">--print-defaults</a></td>
<td>Print default options</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_protocol">--protocol</a></td>
<td>Connection protocol to use</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_quick">--quick</a></td>
<td>Retrieve rows for a table from the server a row at a time</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_quote-names">--quote-names</a></td>
<td>Quote identifiers within backtick characters</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_replace">--replace</a></td>
<td>Write REPLACE statements rather than INSERT statements</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_result-file">--result-file</a></td>
<td>Direct output to a given file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_routines">--routines</a></td>
<td>Dump stored routines (procedures and functions) from dumped databases</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_secure-auth">--secure-auth</a></td>
<td>Do not send passwords to server in old (pre-4.1) format</td>
<td></td>
<td>8.0.3</td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_server-public-key-path">--server-public-key-path</a></td>
<td>Path name to file containing RSA public key</td>
<td>8.0.4</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_set-charset">--set-charset</a></td>
<td>Add SET NAMES default_character_set to output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_set-gtid-purged">--set-gtid-purged</a></td>
<td>Whether to add SET @@GLOBAL.GTID_PURGED to output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_shared-memory-base-name">--shared-memory-base-name</a></td>
<td>Name of shared memory to use for shared-memory connections</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_single-transaction">--single-transaction</a></td>
<td>Issue a BEGIN SQL statement before dumping data from server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_add-drop-table">--skip-add-drop-table</a></td>
<td>Do not add a DROP TABLE statement before each CREATE TABLE statement</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_add-locks">--skip-add-locks</a></td>
<td>Do not add locks</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_skip-comments">--skip-comments</a></td>
<td>Do not add comments to dump file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_compact">--skip-compact</a></td>
<td>Do not produce more compact output</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_disable-keys">--skip-disable-keys</a></td>
<td>Do not disable keys</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_extended-insert">--skip-extended-insert</a></td>
<td>Turn off extended-insert</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_skip-opt">--skip-opt</a></td>
<td>Turn off options set by --opt</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_quick">--skip-quick</a></td>
<td>Do not retrieve rows for a table from the server a row at a time</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_quote-names">--skip-quote-names</a></td>
<td>Do not quote identifiers</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_set-charset">--skip-set-charset</a></td>
<td>Do not write SET NAMES statement</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_triggers">--skip-triggers</a></td>
<td>Do not dump triggers</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_tz-utc">--skip-tz-utc</a></td>
<td>Turn off tz-utc</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_socket">--socket</a></td>
<td>The Unix socket file or Windows named pipe to use</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-ca</a></td>
<td>File that contains list of trusted SSL Certificate Authorities</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-capath</a></td>
<td>Directory that contains trusted SSL Certificate Authority certificate files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-cert</a></td>
<td>File that contains X.509 certificate</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-cipher</a></td>
<td>Permissible ciphers for connection encryption</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-crl</a></td>
<td>File that contains certificate revocation lists</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-crlpath</a></td>
<td>Directory that contains certificate revocation-list files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl-fips-mode">--ssl-fips-mode</a></td>
<td>Whether to enable FIPS mode on client side</td>
<td>8.0.11</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-key</a></td>
<td>File that contains X.509 key</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_ssl">--ssl-mode</a></td>
<td>Desired security state of connection to server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_tab">--tab</a></td>
<td>Produce tab-separated data files</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_tables">--tables</a></td>
<td>Override --databases or -B option</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_tls-ciphersuites">--tls-ciphersuites</a></td>
<td>Permissible TLSv1.3 ciphersuites for encrypted connections</td>
<td>8.0.16</td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_tls-version">--tls-version</a></td>
<td>Permissible TLS protocols for encrypted connections</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_triggers">--triggers</a></td>
<td>Dump triggers for each dumped table</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_tz-utc">--tz-utc</a></td>
<td>Add SET TIME_ZONE='+00:00' to dump file</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_user">--user</a></td>
<td>MySQL user name to use when connecting to server</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_verbose">--verbose</a></td>
<td>Verbose mode</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_version">--version</a></td>
<td>Display version information and exit</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_where">--where</a></td>
<td>Dump only rows selected by given WHERE condition</td>
<td></td>
<td></td>
</tr><tr><td scope="row"><a class="link" href="mysqldump.html#option_mysqldump_xml">--xml</a></td>
<td>Produce XML output</td>
<td></td>
<td></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
<h4><a name="mysqldump-connection-options"></a>Connection Options</h4>
<p>
        The <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> command logs into a MySQL
        server to extract information. The following options specify how
        to connect to the MySQL server, either on the same machine or a
        remote system.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_bind-address"></a>
            <a class="indexterm" name="idm139663286047424"></a>

            <a class="indexterm" name="idm139663286045936"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_bind-address"><code class="option">--bind-address=<em class="replaceable"><code>ip_address</code></em></code></a>
          </p><p>
            On a computer having multiple network interfaces, use this
            option to select which interface to use for connecting to
            the MySQL server.
          </p></li><li class="listitem"><p><a name="option_mysqldump_compress"></a>
            <a class="indexterm" name="idm139663286041392"></a>

            <a class="indexterm" name="idm139663286039904"></a>

            <code class="option">--compress</code>, <code class="option">-C</code>
          </p><p>
            Compress all information sent between the client and the
            server if possible. See
            <a class="xref" href="connection-compression-control.html" title="4.2.6 Connection Compression Control">Section 4.2.6, “Connection Compression Control”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_default-auth"></a>
            <a class="indexterm" name="idm139663286035232"></a>

            <a class="indexterm" name="idm139663286033744"></a>

            <code class="option">--default-auth=<em class="replaceable"><code>plugin</code></em></code>
          </p><p>
            A hint about which client-side authentication plugin to use.
            See <a class="xref" href="pluggable-authentication.html" title="6.2.17 Pluggable Authentication">Section 6.2.17, “Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_enable-cleartext-plugin"></a>
            <a class="indexterm" name="idm139663286029088"></a>

            <a class="indexterm" name="idm139663286027632"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_enable-cleartext-plugin"><code class="option">--enable-cleartext-plugin</code></a>
          </p><p>
            Enable the <code class="literal">mysql_clear_password</code> cleartext
            authentication plugin. (See
            <a class="xref" href="cleartext-pluggable-authentication.html" title="6.4.1.4 Client-Side Cleartext Pluggable Authentication">Section 6.4.1.4, “Client-Side Cleartext Pluggable Authentication”</a>.)
          </p></li><li class="listitem"><p><a name="option_mysqldump_get-server-public-key"></a>
            <a class="indexterm" name="idm139663286022064"></a>

            <a class="indexterm" name="idm139663286020608"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_get-server-public-key"><code class="option">--get-server-public-key</code></a>
          </p><p>
            Request from the server the public key required for RSA key
            pair-based password exchange. This option applies to clients
            that authenticate with the
            <code class="literal">caching_sha2_password</code> authentication
            plugin. For that plugin, the server does not send the public
            key unless requested. This option is ignored for accounts
            that do not authenticate with that plugin. It is also
            ignored if RSA-based password exchange is not used, as is
            the case when the client connects to the server using a
            secure connection.
          </p><p>
            If
            <a class="link" href="mysqldump.html#option_mysqldump_server-public-key-path"><code class="option">--server-public-key-path=<em class="replaceable"><code>file_name</code></em></code></a>
            is given and specifies a valid public key file, it takes
            precedence over
            <a class="link" href="mysqldump.html#option_mysqldump_get-server-public-key"><code class="option">--get-server-public-key</code></a>.
          </p><p>
            For information about the
            <code class="literal">caching_sha2_password</code> plugin, see
            <a class="xref" href="caching-sha2-pluggable-authentication.html" title="6.4.1.3 Caching SHA-2 Pluggable Authentication">Section 6.4.1.3, “Caching SHA-2 Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_host"></a>
            <a class="indexterm" name="idm139663286010528"></a>

            <a class="indexterm" name="idm139663286009072"></a>

            <code class="option">--host=<em class="replaceable"><code>host_name</code></em></code>,
            <code class="option">-h <em class="replaceable"><code>host_name</code></em></code>
          </p><p>
            Dump data from the MySQL server on the given host. The
            default host is <code class="literal">localhost</code>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_login-path"></a>
            <a class="indexterm" name="idm139663286003776"></a>

            <a class="indexterm" name="idm139663286002288"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_login-path"><code class="option">--login-path=<em class="replaceable"><code>name</code></em></code></a>
          </p><p>
            Read options from the named login path in the
            <code class="filename">.mylogin.cnf</code> login path file. A
            <span class="quote">“<span class="quote">login path</span>”</span> is an option group containing
            options that specify which MySQL server to connect to and
            which account to authenticate as. To create or modify a
            login path file, use the
            <a class="link" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility"><span class="command"><strong>mysql_config_editor</strong></span></a> utility. See
            <a class="xref" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility">Section 4.6.7, “<span class="command"><strong>mysql_config_editor</strong></span> — MySQL Configuration Utility”</a>.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_password"></a>
            <a class="indexterm" name="idm139663285993376"></a>

            <a class="indexterm" name="idm139663285991888"></a>

            <code class="option">--password[=<em class="replaceable"><code>password</code></em>]</code>,
            <code class="option">-p[<em class="replaceable"><code>password</code></em>]</code>
          </p><p>
            The password of the MySQL account used for connecting to the
            server. The password value is optional. If not given,
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> prompts for one. If given,
            there must be <span class="emphasis"><em>no space</em></span> between
            <a class="link" href="mysqldump.html#option_mysqldump_password"><code class="option">--password=</code></a> or
            <code class="option">-p</code> and the password following it. If no
            password option is specified, the default is to send no
            password.
          </p><p>
            Specifying a password on the command line should be
            considered insecure. To avoid giving the password on the
            command line, use an option file. See
            <a class="xref" href="password-security-user.html" title="6.1.2.1 End-User Guidelines for Password Security">Section 6.1.2.1, “End-User Guidelines for Password Security”</a>.
          </p><p>
            To explicitly specify that there is no password and that
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> should not prompt for one, use
            the
            <a class="link" href="mysqldump.html#option_mysqldump_password"><code class="option">--skip-password</code></a>
            option.
          </p></li><li class="listitem"><p><a name="option_mysqldump_pipe"></a>
            <a class="indexterm" name="idm139663285979712"></a>

            <a class="indexterm" name="idm139663285978256"></a>

            <code class="option">--pipe</code>, <code class="option">-W</code>
          </p><p>
            On Windows, connect to the server using a named pipe. This
            option applies only if the server was started with the
            <a class="link" href="server-system-variables.html#sysvar_named_pipe"><code class="literal">named_pipe</code></a> system variable
            enabled to support named-pipe connections. In addition, the
            user making the connection must be a member of the Windows
            group specified by the
            <a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group"><code class="literal">named_pipe_full_access_group</code></a>
            system variable.
          </p></li><li class="listitem"><p><a name="option_mysqldump_plugin-dir"></a>
            <a class="indexterm" name="idm139663285971472"></a>

            <a class="indexterm" name="idm139663285969984"></a>

            <code class="option">--plugin-dir=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The directory in which to look for plugins. Specify this
            option if the
            <a class="link" href="mysqldump.html#option_mysqldump_default-auth"><code class="option">--default-auth</code></a> option is
            used to specify an authentication plugin but
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> does not find it. See
            <a class="xref" href="pluggable-authentication.html" title="6.2.17 Pluggable Authentication">Section 6.2.17, “Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_port"></a>
            <a class="indexterm" name="idm139663285963040"></a>

            <a class="indexterm" name="idm139663285961584"></a>

            <code class="option">--port=<em class="replaceable"><code>port_num</code></em></code>,
            <code class="option">-P <em class="replaceable"><code>port_num</code></em></code>
          </p><p>
            For TCP/IP connections, the port number to use.
          </p></li><li class="listitem"><p><a name="option_mysqldump_protocol"></a>
            <a class="indexterm" name="idm139663285957056"></a>

            <a class="indexterm" name="idm139663285955568"></a>

            <code class="option">--protocol={TCP|SOCKET|PIPE|MEMORY}</code>
          </p><p>
            The connection protocol to use for connecting to the server.
            It is useful when the other connection parameters normally
            result in use of a protocol other than the one you want. For
            details on the permissible values, see
            <a class="xref" href="connecting.html" title="4.2.4 Connecting to the MySQL Server Using Command Options">Section 4.2.4, “Connecting to the MySQL Server Using Command Options”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_secure-auth"></a>
            <a class="indexterm" name="idm139663285951120"></a>

            <a class="indexterm" name="idm139663285949632"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_secure-auth"><code class="option">--secure-auth</code></a>
          </p><p>
            This option was removed in MySQL 8.0.3.
          </p></li><li class="listitem"><p><a name="option_mysqldump_server-public-key-path"></a>
            <a class="indexterm" name="idm139663285945552"></a>

            <a class="indexterm" name="idm139663285944096"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_server-public-key-path"><code class="option">--server-public-key-path=<em class="replaceable"><code>file_name</code></em></code></a>
          </p><p>
            The path name to a file containing a client-side copy of the
            public key required by the server for RSA key pair-based
            password exchange. The file must be in PEM format. This
            option applies to clients that authenticate with the
            <code class="literal">sha256_password</code> or
            <code class="literal">caching_sha2_password</code> authentication
            plugin. This option is ignored for accounts that do not
            authenticate with one of those plugins. It is also ignored
            if RSA-based password exchange is not used, as is the case
            when the client connects to the server using a secure
            connection.
          </p><p>
            If
            <a class="link" href="mysqldump.html#option_mysqldump_server-public-key-path"><code class="option">--server-public-key-path=<em class="replaceable"><code>file_name</code></em></code></a>
            is given and specifies a valid public key file, it takes
            precedence over
            <a class="link" href="mysqldump.html#option_mysqldump_get-server-public-key"><code class="option">--get-server-public-key</code></a>.
          </p><p>
            For <code class="literal">sha256_password</code>, this option applies
            only if MySQL was built using OpenSSL.
          </p><p>
            For information about the <code class="literal">sha256_password</code>
            and <code class="literal">caching_sha2_password</code> plugins, see
            <a class="xref" href="sha256-pluggable-authentication.html" title="6.4.1.2 SHA-256 Pluggable Authentication">Section 6.4.1.2, “SHA-256 Pluggable Authentication”</a>, and
            <a class="xref" href="caching-sha2-pluggable-authentication.html" title="6.4.1.3 Caching SHA-2 Pluggable Authentication">Section 6.4.1.3, “Caching SHA-2 Pluggable Authentication”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_socket"></a>
            <a class="indexterm" name="idm139663285930368"></a>

            <a class="indexterm" name="idm139663285928912"></a>

            <code class="option">--socket=<em class="replaceable"><code>path</code></em></code>,
            <code class="option">-S <em class="replaceable"><code>path</code></em></code>
          </p><p>
            For connections to <code class="literal">localhost</code>, the Unix
            socket file to use, or, on Windows, the name of the named
            pipe to use.
          </p><p>
            On Windows, this option applies only if the server was
            started with the <a class="link" href="server-system-variables.html#sysvar_named_pipe"><code class="literal">named_pipe</code></a>
            system variable enabled to support named-pipe connections.
            In addition, the user making the connection must be a member
            of the Windows group specified by the
            <a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group"><code class="literal">named_pipe_full_access_group</code></a>
            system variable.
          </p></li><li class="listitem"><p><a name="option_mysqldump_ssl"></a>
            <a class="indexterm" name="idm139663285920416"></a>

            <a class="indexterm" name="idm139663285918960"></a>

            <code class="option">--ssl*</code>
          </p><p>
            Options that begin with
            <a class="link" href="connection-options.html#option_general_ssl"><code class="option">--ssl</code></a> specify whether to
            connect to the server using SSL and indicate where to find
            SSL keys and certificates. See
            <a class="xref" href="connection-options.html#encrypted-connection-options" title="Command Options for Encrypted Connections">Command Options for Encrypted Connections</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_ssl-fips-mode"></a>
            <a class="link" href="mysqldump.html#option_mysqldump_ssl-fips-mode"><code class="option">--ssl-fips-mode={OFF|ON|STRICT}</code></a>
          </p><a class="indexterm" name="idm139663285912544"></a><p>
            Controls whether to enable FIPS mode on the client side. The
            <a class="link" href="mysqldump.html#option_mysqldump_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a> option
            differs from other
            <code class="option">--ssl-<em class="replaceable"><code>xxx</code></em></code>
            options in that it is not used to establish encrypted
            connections, but rather to affect which cryptographic
            operations are permitted. See <a class="xref" href="fips-mode.html" title="6.5 FIPS Support">Section 6.5, “FIPS Support”</a>.
          </p><p>
            These <a class="link" href="mysqldump.html#option_mysqldump_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a>
            values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="literal">OFF</code>: Disable FIPS mode.
              </p></li><li class="listitem"><p>
                <code class="literal">ON</code>: Enable FIPS mode.
              </p></li><li class="listitem"><p>
                <code class="literal">STRICT</code>: Enable <span class="quote">“<span class="quote">strict</span>”</span>
                FIPS mode.
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
              If the OpenSSL FIPS Object Module is not available, the
              only permitted value for
              <a class="link" href="mysqldump.html#option_mysqldump_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a> is
              <code class="literal">OFF</code>. In this case, setting
              <a class="link" href="mysqldump.html#option_mysqldump_ssl-fips-mode"><code class="option">--ssl-fips-mode</code></a> to
              <code class="literal">ON</code> or <code class="literal">STRICT</code> causes
              the client to produce a warning at startup and to operate
              in non-FIPS mode.
</p>
</div>
</li><li class="listitem"><p><a name="option_mysqldump_tls-ciphersuites"></a>
            <a class="indexterm" name="idm139663285895488"></a>

            <a class="indexterm" name="idm139663285894000"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_tls-ciphersuites"><code class="option">--tls-ciphersuites=<em class="replaceable"><code>ciphersuite_list</code></em></code></a>
          </p><p>
            The permissible TLSv1.3 ciphersuites for encrypted
            connections. The value is a list of one or more
            colon-separated ciphersuite names. The ciphersuites that can
            be named for this option depend on the SSL library used to
            compile MySQL. For details, see
            <a class="xref" href="encrypted-connection-protocols-ciphers.html" title="6.3.5 Encrypted Connection Protocols and Ciphers">Section 6.3.5, “Encrypted Connection Protocols and Ciphers”</a>.
          </p><p>
            This option was added in MySQL 8.0.16.
          </p></li><li class="listitem"><p><a name="option_mysqldump_tls-version"></a>
            <a class="indexterm" name="idm139663285888144"></a>

            <a class="indexterm" name="idm139663285886656"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_tls-version"><code class="option">--tls-version=<em class="replaceable"><code>protocol_list</code></em></code></a>
          </p><p>
            The permissible TLS protocols for encrypted connections. The
            value is a list of one or more comma-separated protocol
            names. The protocols that can be named for this option
            depend on the SSL library used to compile MySQL. For
            details, see
            <a class="xref" href="encrypted-connection-protocols-ciphers.html" title="6.3.5 Encrypted Connection Protocols and Ciphers">Section 6.3.5, “Encrypted Connection Protocols and Ciphers”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_user"></a>
            <a class="indexterm" name="idm139663285881280"></a>

            <a class="indexterm" name="idm139663285879824"></a>

            <code class="option">--user=<em class="replaceable"><code>user_name</code></em></code>,
            <code class="option">-u <em class="replaceable"><code>user_name</code></em></code>
          </p><p>
            The user name of the MySQL account to use for connecting to
            the server.
</p></li></ul>
</div>
<h4><a name="mysqldump-option-file-options"></a>Option-File Options</h4>
<p>
        These options are used to control which option files to read.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_defaults-extra-file"></a>
            <a class="indexterm" name="idm139663285873296"></a>

            <a class="indexterm" name="idm139663285871840"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_defaults-extra-file"><code class="option">--defaults-extra-file=<em class="replaceable"><code>file_name</code></em></code></a>
          </p><p>
            Read this option file after the global option file but (on
            Unix) before the user option file. If the file does not
            exist or is otherwise inaccessible, an error occurs.
            <em class="replaceable"><code>file_name</code></em> is interpreted relative
            to the current directory if given as a relative path name
            rather than a full path name.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_defaults-file"></a>
            <a class="indexterm" name="idm139663285865504"></a>

            <a class="indexterm" name="idm139663285864016"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_defaults-file"><code class="option">--defaults-file=<em class="replaceable"><code>file_name</code></em></code></a>
          </p><p>
            Use only the given option file. If the file does not exist
            or is otherwise inaccessible, an error occurs.
            <em class="replaceable"><code>file_name</code></em> is interpreted relative
            to the current directory if given as a relative path name
            rather than a full path name.
          </p><p>
            Exception: Even with
            <a class="link" href="option-file-options.html#option_general_defaults-file"><code class="option">--defaults-file</code></a>, client
            programs read <code class="filename">.mylogin.cnf</code>.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_defaults-group-suffix"></a>
            <a class="indexterm" name="idm139663285855648"></a>

            <a class="indexterm" name="idm139663285854192"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_defaults-group-suffix"><code class="option">--defaults-group-suffix=<em class="replaceable"><code>str</code></em></code></a>
          </p><p>
            Read not only the usual option groups, but also groups with
            the usual names and a suffix of
            <em class="replaceable"><code>str</code></em>. For example,
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> normally reads the
            <code class="literal">[client]</code> and
            <code class="literal">[mysqldump]</code> groups. If the
            <a class="link" href="mysqldump.html#option_mysqldump_defaults-group-suffix"><code class="option">--defaults-group-suffix=_other</code></a>
            option is given, <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> also reads the
            <code class="literal">[client_other]</code> and
            <code class="literal">[mysqldump_other]</code> groups.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_no-defaults"></a>
            <a class="indexterm" name="idm139663285841696"></a>

            <a class="indexterm" name="idm139663285840208"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_no-defaults"><code class="option">--no-defaults</code></a>
          </p><p>
            Do not read any option files. If program startup fails due
            to reading unknown options from an option file,
            <a class="link" href="mysqldump.html#option_mysqldump_no-defaults"><code class="option">--no-defaults</code></a> can be used
            to prevent them from being read.
          </p><p>
            The exception is that the <code class="filename">.mylogin.cnf</code>
            file, if it exists, is read in all cases. This permits
            passwords to be specified in a safer way than on the command
            line even when
            <a class="link" href="mysqldump.html#option_mysqldump_no-defaults"><code class="option">--no-defaults</code></a> is used.
            (<code class="filename">.mylogin.cnf</code> is created by the
            <a class="link" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility"><span class="command"><strong>mysql_config_editor</strong></span></a> utility. See
            <a class="xref" href="mysql-config-editor.html" title="4.6.7 mysql_config_editor — MySQL Configuration Utility">Section 4.6.7, “<span class="command"><strong>mysql_config_editor</strong></span> — MySQL Configuration Utility”</a>.)
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_print-defaults"></a>
            <a class="indexterm" name="idm139663285828880"></a>

            <a class="indexterm" name="idm139663285827392"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_print-defaults"><code class="option">--print-defaults</code></a>
          </p><p>
            Print the program name and all options that it gets from
            option files.
          </p><p>
            For additional information about this and other option-file
            options, see <a class="xref" href="option-file-options.html" title="4.2.2.3 Command-Line Options that Affect Option-File Handling">Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”</a>.
</p></li></ul>
</div>
<h4><a name="mysqldump-ddl-options"></a>DDL Options</h4>
<p>
        Usage scenarios for <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> include setting
        up an entire new MySQL instance (including database tables), and
        replacing data inside an existing instance with existing
        databases and tables. The following options let you specify
        which things to tear down and set up when restoring a dump, by
        encoding various DDL statements within the dump file.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_add-drop-database"></a>
            <a class="indexterm" name="idm139663285818640"></a>

            <a class="indexterm" name="idm139663285817184"></a>

            <code class="option">--add-drop-database</code>
          </p><p>
            Write a <a class="link" href="drop-database.html" title="13.1.24 DROP DATABASE Syntax"><code class="literal">DROP DATABASE</code></a>
            statement before each <a class="link" href="create-database.html" title="13.1.12 CREATE DATABASE Syntax"><code class="literal">CREATE
            DATABASE</code></a> statement. This option is typically used
            in conjunction with the
            <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> or
            <a class="link" href="mysqldump.html#option_mysqldump_databases"><code class="option">--databases</code></a> option because
            no <a class="link" href="create-database.html" title="13.1.12 CREATE DATABASE Syntax"><code class="literal">CREATE DATABASE</code></a> statements
            are written unless one of those options is specified.
          </p></li><li class="listitem"><p><a name="option_mysqldump_add-drop-table"></a>
            <a class="indexterm" name="idm139663285807680"></a>

            <a class="indexterm" name="idm139663285806192"></a>

            <code class="option">--add-drop-table</code>
          </p><p>
            Write a <a class="link" href="drop-table.html" title="13.1.32 DROP TABLE Syntax"><code class="literal">DROP TABLE</code></a> statement
            before each <a class="link" href="create-table.html" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a>
            statement.
          </p></li><li class="listitem"><p><a name="option_mysqldump_add-drop-trigger"></a>
            <a class="indexterm" name="idm139663285800208"></a>

            <a class="indexterm" name="idm139663285798720"></a>

            <code class="option">--add-drop-trigger</code>
          </p><p>
            Write a <a class="link" href="drop-trigger.html" title="13.1.34 DROP TRIGGER Syntax"><code class="literal">DROP TRIGGER</code></a>
            statement before each <a class="link" href="create-trigger.html" title="13.1.22 CREATE TRIGGER Syntax"><code class="literal">CREATE
            TRIGGER</code></a> statement.
          </p></li><li class="listitem"><p><a name="option_mysqldump_all-tablespaces"></a>
            <a class="indexterm" name="idm139663285792320"></a>

            <a class="indexterm" name="idm139663285790832"></a>

            <code class="option">--all-tablespaces</code>, <code class="option">-Y</code>
          </p><p>
            Adds to a table dump all SQL statements needed to create any
            tablespaces used by an <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a>
            table. This information is not otherwise included in the
            output from <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>. This option is
            currently relevant only to NDB Cluster tables.
          </p></li><li class="listitem"><p><a name="option_mysqldump_no-create-db"></a>
            <a class="indexterm" name="idm139663285784176"></a>

            <a class="indexterm" name="idm139663285782688"></a>

            <code class="option">--no-create-db</code>, <code class="option">-n</code>
          </p><p>
            Suppress the <a class="link" href="create-database.html" title="13.1.12 CREATE DATABASE Syntax"><code class="literal">CREATE DATABASE</code></a>
            statements that are otherwise included in the output if the
            <a class="link" href="mysqldump.html#option_mysqldump_databases"><code class="option">--databases</code></a> or
            <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option is
            given.
          </p></li><li class="listitem"><p><a name="option_mysqldump_no-create-info"></a>
            <a class="indexterm" name="idm139663285775424"></a>

            <a class="indexterm" name="idm139663285773936"></a>

            <code class="option">--no-create-info</code>, <code class="option">-t</code>
          </p><p>
            Do not write <a class="link" href="create-table.html" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a>
            statements that create each dumped table.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              This option does <span class="emphasis"><em>not</em></span> exclude
              statements creating log file groups or tablespaces from
              <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> output; however, you can use
              the <a class="link" href="mysqldump.html#option_mysqldump_no-tablespaces"><code class="option">--no-tablespaces</code></a>
              option for this purpose.
</p>
</div>
</li><li class="listitem"><p><a name="option_mysqldump_no-tablespaces"></a>
            <a class="indexterm" name="idm139663285765104"></a>

            <a class="indexterm" name="idm139663285763616"></a>

            <code class="option">--no-tablespaces</code>, <code class="option">-y</code>
          </p><p>
            This option suppresses all <a class="link" href="create-logfile-group.html" title="13.1.16 CREATE LOGFILE GROUP Syntax"><code class="literal">CREATE
            LOGFILE GROUP</code></a> and <a class="link" href="create-tablespace.html" title="13.1.21 CREATE TABLESPACE Syntax"><code class="literal">CREATE
            TABLESPACE</code></a> statements in the output of
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_replace"></a>
            <a class="indexterm" name="idm139663285755792"></a>

            <a class="indexterm" name="idm139663285754304"></a>

            <code class="option">--replace</code>
          </p><p>
            Write <a class="link" href="replace.html" title="13.2.9 REPLACE Syntax"><code class="literal">REPLACE</code></a> statements
            rather than <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>
            statements.
</p></li></ul>
</div>
<h4><a name="mysqldump-debug-options"></a>Debug Options</h4>
<p>
        The following options print debugging information, encode
        debugging information in the dump file, or let the dump
        operation proceed regardless of potential problems.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_allow-keywords"></a>
            <a class="indexterm" name="idm139663285746288"></a>

            <a class="indexterm" name="idm139663285744800"></a>

            <code class="option">--allow-keywords</code>
          </p><p>
            Permit creation of column names that are keywords. This
            works by prefixing each column name with the table name.
          </p></li><li class="listitem"><p><a name="option_mysqldump_comments"></a>
            <a class="indexterm" name="idm139663285741184"></a>

            <a class="indexterm" name="idm139663285739696"></a>

            <code class="option">--comments</code>, <code class="option">-i</code>
          </p><p>
            Write additional information in the dump file such as
            program version, server version, and host. This option is
            enabled by default. To suppress this additional information,
            use <a class="link" href="mysqldump.html#option_mysqldump_skip-comments"><code class="option">--skip-comments</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_debug"></a>
            <a class="indexterm" name="idm139663285734656"></a>

            <a class="indexterm" name="idm139663285733200"></a>

            <code class="option">--debug[=<em class="replaceable"><code>debug_options</code></em>]</code>,
            <code class="option">-#
            [<em class="replaceable"><code>debug_options</code></em>]</code>
          </p><p>
            Write a debugging log. A typical
            <em class="replaceable"><code>debug_options</code></em> string is
            <code class="literal">d:t:o,<em class="replaceable"><code>file_name</code></em></code>.
            The default value is
            <code class="literal">d:t:o,/tmp/mysqldump.trace</code>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_debug-check"></a>
            <a class="indexterm" name="idm139663285726112"></a>

            <a class="indexterm" name="idm139663285724624"></a>

            <code class="option">--debug-check</code>
          </p><p>
            Print some debugging information when the program exits.
          </p></li><li class="listitem"><p><a name="option_mysqldump_debug-info"></a>
            <a class="indexterm" name="idm139663285721072"></a>

            <a class="indexterm" name="idm139663285719584"></a>

            <code class="option">--debug-info</code>
          </p><p>
            Print debugging information and memory and CPU usage
            statistics when the program exits.
          </p></li><li class="listitem"><p><a name="option_mysqldump_dump-date"></a>
            <a class="indexterm" name="idm139663285715920"></a>

            <a class="indexterm" name="idm139663285714432"></a>

            <code class="option">--dump-date</code>
          </p><p>
            If the <a class="link" href="mysqldump.html#option_mysqldump_comments"><code class="option">--comments</code></a> option
            is given, <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> produces a comment at
            the end of the dump of the following form:
          </p><pre class="programlisting copytoclipboard line-numbers language-none one-line"><code class="language-none">-- Dump completed on <em class="replaceable">DATE</em></code></pre><p>
            However, the date causes dump files taken at different times
            to appear to be different, even if the data are otherwise
            identical. <a class="link" href="mysqldump.html#option_mysqldump_dump-date"><code class="option">--dump-date</code></a> and
            <a class="link" href="mysqldump.html#option_mysqldump_dump-date"><code class="option">--skip-dump-date</code></a>
            control whether the date is added to the comment. The
            default is <a class="link" href="mysqldump.html#option_mysqldump_dump-date"><code class="option">--dump-date</code></a>
            (include the date in the comment).
            <a class="link" href="mysqldump.html#option_mysqldump_dump-date"><code class="option">--skip-dump-date</code></a>
            suppresses date printing.
          </p></li><li class="listitem"><p><a name="option_mysqldump_force"></a>
            <a class="indexterm" name="idm139663285702560"></a>

            <a class="indexterm" name="idm139663285701104"></a>

            <code class="option">--force</code>, <code class="option">-f</code>
          </p><p>
            Ignore all errors; continue even if an SQL error occurs
            during a table dump.
          </p><p>
            One use for this option is to cause
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to continue executing even when
            it encounters a view that has become invalid because the
            definition refers to a table that has been dropped. Without
            <code class="option">--force</code>, <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> exits
            with an error message. With <code class="option">--force</code>,
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> prints the error message, but
            it also writes an SQL comment containing the view definition
            to the dump output and continues executing.
          </p><p>
            If the <a class="link" href="mysqldump.html#option_mysqldump_ignore-error"><code class="option">--ignore-error</code></a>
            option is also given to ignore specific errors,
            <a class="link" href="mysqldump.html#option_mysqldump_force"><code class="option">--force</code></a> takes precedence.
          </p></li><li class="listitem"><p><a name="option_mysqldump_log-error"></a>
            <a class="indexterm" name="idm139663285689232"></a>

            <a class="indexterm" name="idm139663285687744"></a>

            <code class="option">--log-error=<em class="replaceable"><code>file_name</code></em></code>
          </p><p>
            Log warnings and errors by appending them to the named file.
            The default is to do no logging.
          </p></li><li class="listitem"><p><a name="option_mysqldump_skip-comments"></a>
            <a class="indexterm" name="idm139663285683856"></a>

            <a class="indexterm" name="idm139663285682368"></a>

            <code class="option">--skip-comments</code>
          </p><p>
            See the description for the
            <a class="link" href="mysqldump.html#option_mysqldump_comments"><code class="option">--comments</code></a> option.
          </p></li><li class="listitem"><p><a name="option_mysqldump_verbose"></a>
            <a class="indexterm" name="idm139663285677856"></a>

            <a class="indexterm" name="idm139663285676368"></a>

            <code class="option">--verbose</code>, <code class="option">-v</code>
          </p><p>
            Verbose mode. Print more information about what the program
            does.
</p></li></ul>
</div>
<h4><a name="mysqldump-help-options"></a>Help Options</h4>
<p>
        The following options display information about the
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> command itself.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_help"></a>
            <a class="indexterm" name="idm139663285669328"></a>

            <a class="indexterm" name="idm139663285667872"></a>

            <code class="option">--help</code>, <code class="option">-?</code>
          </p><p>
            Display a help message and exit.
          </p></li><li class="listitem"><p><a name="option_mysqldump_version"></a>
            <a class="indexterm" name="idm139663285663840"></a>

            <a class="indexterm" name="idm139663285662352"></a>

            <code class="option">--version</code>, <code class="option">-V</code>
          </p><p>
            Display version information and exit.
</p></li></ul>
</div>
<h4><a name="mysqldump-i18n-options"></a>Internationalization Options</h4>
<p>
        The following options change how the
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> command represents character data
        with national language settings.

        
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_character-sets-dir"></a>
            <a class="indexterm" name="idm139663285654368"></a>

            <a class="indexterm" name="idm139663285652912"></a>

            <code class="option">--character-sets-dir=<em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            The directory where character sets are installed. See
            <a class="xref" href="charset-configuration.html" title="10.14 Character Set Configuration">Section 10.14, “Character Set Configuration”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_default-character-set"></a>
            <a class="indexterm" name="idm139663285648336"></a>

            <a class="indexterm" name="idm139663285646880"></a>

            <code class="option">--default-character-set=<em class="replaceable"><code>charset_name</code></em></code>
          </p><p>
            Use <em class="replaceable"><code>charset_name</code></em> as the default
            character set. See <a class="xref" href="charset-configuration.html" title="10.14 Character Set Configuration">Section 10.14, “Character Set Configuration”</a>.
            If no character set is specified,
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> uses <code class="literal">utf8</code>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_no-set-names"></a>
            <a class="indexterm" name="idm139663285639872"></a>

            <a class="indexterm" name="idm139663285638384"></a>

            <code class="option">--no-set-names</code>, <code class="option">-N</code>
          </p><p>
            Turns off the
            <a class="link" href="mysqldump.html#option_mysqldump_set-charset"><code class="option">--set-charset</code></a> setting, the
            same as specifying <code class="option">--skip-set-charset</code>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_set-charset"></a>
            <a class="indexterm" name="idm139663285632960"></a>

            <a class="indexterm" name="idm139663285631472"></a>

            <code class="option">--set-charset</code>
          </p><p>
            Write <a class="link" href="set-names.html" title="13.7.5.3 SET NAMES Syntax"><code class="literal">SET NAMES
            <em class="replaceable"><code>default_character_set</code></em></code></a>
            to the output. This option is enabled by default. To
            suppress the <a class="link" href="set-names.html" title="13.7.5.3 SET NAMES Syntax"><code class="literal">SET NAMES</code></a>
            statement, use
            <a class="link" href="mysqldump.html#option_mysqldump_set-charset"><code class="option">--skip-set-charset</code></a>.
</p></li></ul>
</div>
<h4><a name="mysqldump-replication-options"></a>Replication Options</h4>
<p>
        The <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> command is frequently used to
        create an empty instance, or an instance including data, on a
        slave server in a replication configuration. The following
        options apply to dumping and restoring data on replication
        master and slave servers.

        
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_apply-slave-statements"></a>
            <a class="indexterm" name="idm139663285619936"></a>

            <a class="indexterm" name="idm139663285618480"></a>

            <code class="option">--apply-slave-statements</code>
          </p><p>
            For a slave dump produced with the
            <a class="link" href="mysqldump.html#option_mysqldump_dump-slave"><code class="option">--dump-slave</code></a> option, add a
            <a class="link" href="stop-slave.html" title="13.4.2.7 STOP SLAVE Syntax"><code class="literal">STOP SLAVE</code></a> statement before
            the <a class="link" href="change-master-to.html" title="13.4.2.1 CHANGE MASTER TO Syntax"><code class="literal">CHANGE MASTER TO</code></a>
            statement and a <a class="link" href="start-slave.html" title="13.4.2.6 START SLAVE Syntax"><code class="literal">START SLAVE</code></a>
            statement at the end of the output.
          </p></li><li class="listitem"><p><a name="option_mysqldump_delete-master-logs"></a>
            <a class="indexterm" name="idm139663285609728"></a>

            <a class="indexterm" name="idm139663285608272"></a>

            <code class="option">--delete-master-logs</code>
          </p><p>
            On a master replication server, delete the binary logs by
            sending a <a class="link" href="purge-binary-logs.html" title="13.4.1.1 PURGE BINARY LOGS Syntax"><code class="literal">PURGE BINARY LOGS</code></a>
            statement to the server after performing the dump operation.
            This option automatically enables
            <a class="link" href="mysqldump.html#option_mysqldump_master-data"><code class="option">--master-data</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_dump-slave"></a>
            <a class="indexterm" name="idm139663285602128"></a>

            <a class="indexterm" name="idm139663285600640"></a>

            <code class="option">--dump-slave[=<em class="replaceable"><code>value</code></em>]</code>
          </p><p>
            This option is similar to
            <a class="link" href="mysqldump.html#option_mysqldump_master-data"><code class="option">--master-data</code></a> except that
            it is used to dump a replication slave server to produce a
            dump file that can be used to set up another server as a
            slave that has the same master as the dumped server. It
            causes the dump output to include a
            <a class="link" href="change-master-to.html" title="13.4.2.1 CHANGE MASTER TO Syntax"><code class="literal">CHANGE MASTER TO</code></a> statement
            that indicates the binary log coordinates (file name and
            position) of the dumped slave's master. The
            <a class="link" href="change-master-to.html" title="13.4.2.1 CHANGE MASTER TO Syntax"><code class="literal">CHANGE MASTER TO</code></a> statement
            reads the values of <code class="literal">Relay_Master_Log_File</code>
            and <code class="literal">Exec_Master_Log_Pos</code> from the
            <a class="link" href="show-slave-status.html" title="13.7.6.34 SHOW SLAVE STATUS Syntax"><code class="literal">SHOW SLAVE STATUS</code></a> output and
            uses them for <code class="literal">MASTER_LOG_FILE</code> and
            <code class="literal">MASTER_LOG_POS</code> respectively. These are
            the master server coordinates from which the slave should
            start replicating.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              Inconsistencies in the sequence of transactions from the
              relay log which have been executed can cause the wrong
              position to be used. See
              <a class="xref" href="replication-features-transaction-inconsistencies.html" title="17.4.1.33 Replication and Transaction Inconsistencies">Section 17.4.1.33, “Replication and Transaction Inconsistencies”</a>
              for more information.
</p>
</div>
<p>
            <code class="option">--dump-slave</code> causes the coordinates from
            the master to be used rather than those of the dumped
            server, as is done by the
            <a class="link" href="mysqldump.html#option_mysqldump_master-data"><code class="option">--master-data</code></a> option. In
            addition, specfiying this option causes the
            <code class="option">--master-data</code> option to be overridden, if
            used, and effectively ignored.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
              This option should not be used if the server where the
              dump is going to be applied uses
              <a class="link" href="replication-options-gtids.html#sysvar_gtid_mode"><code class="literal">gtid_mode=ON</code></a> and
              <code class="literal">MASTER_AUTOPOSITION=1</code>.
</p>
</div>
<p>
            The option value is handled the same way as for
            <a class="link" href="mysqldump.html#option_mysqldump_master-data"><code class="option">--master-data</code></a> (setting no
            value or 1 causes a <code class="literal">CHANGE MASTER TO</code>
            statement to be written to the dump, setting 2 causes the
            statement to be written but encased in SQL comments) and has
            the same effect as <code class="option">--master-data</code> in terms
            of enabling or disabling other options and in how locking is
            handled.
          </p><p>
            This option causes <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to stop the
            slave SQL thread before the dump and restart it again after.
          </p><p>
            In conjunction with <code class="option">--dump-slave</code>, the
            <a class="link" href="mysqldump.html#option_mysqldump_apply-slave-statements"><code class="option">--apply-slave-statements</code></a>
            and
            <a class="link" href="mysqldump.html#option_mysqldump_include-master-host-port"><code class="option">--include-master-host-port</code></a>
            options can also be used.
          </p></li><li class="listitem"><p><a name="option_mysqldump_include-master-host-port"></a>
            <a class="indexterm" name="idm139663285573424"></a>

            <a class="indexterm" name="idm139663285571920"></a>

            <code class="option">--include-master-host-port</code>
          </p><p>
            For the <a class="link" href="change-master-to.html" title="13.4.2.1 CHANGE MASTER TO Syntax"><code class="literal">CHANGE MASTER TO</code></a>
            statement in a slave dump produced with the
            <a class="link" href="mysqldump.html#option_mysqldump_dump-slave"><code class="option">--dump-slave</code></a> option, add
            <code class="literal">MASTER_HOST</code> and
            <code class="literal">MASTER_PORT</code> options for the host name and
            TCP/IP port number of the slave's master.
          </p></li><li class="listitem"><p><a name="option_mysqldump_master-data"></a>
            <a class="indexterm" name="idm139663285564544"></a>

            <a class="indexterm" name="idm139663285563056"></a>

            <code class="option">--master-data[=<em class="replaceable"><code>value</code></em>]</code>
          </p><p>
            Use this option to dump a master replication server to
            produce a dump file that can be used to set up another
            server as a slave of the master. It causes the dump output
            to include a <a class="link" href="change-master-to.html" title="13.4.2.1 CHANGE MASTER TO Syntax"><code class="literal">CHANGE MASTER TO</code></a>
            statement that indicates the binary log coordinates (file
            name and position) of the dumped server. These are the
            master server coordinates from which the slave should start
            replicating after you load the dump file into the slave.
          </p><p>
            If the option value is 2, the <a class="link" href="change-master-to.html" title="13.4.2.1 CHANGE MASTER TO Syntax"><code class="literal">CHANGE
            MASTER TO</code></a> statement is written as an SQL comment,
            and thus is informative only; it has no effect when the dump
            file is reloaded. If the option value is 1, the statement is
            not written as a comment and takes effect when the dump file
            is reloaded. If no option value is specified, the default
            value is 1.
          </p><p>
            This option requires the
            <a class="link" href="privileges-provided.html#priv_reload"><code class="literal">RELOAD</code></a> privilege and the
            binary log must be enabled.
          </p><p>
            The <code class="option">--master-data</code> option automatically
            turns off <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--lock-tables</code></a>.
            It also turns on
            <a class="link" href="mysqldump.html#option_mysqldump_lock-all-tables"><code class="option">--lock-all-tables</code></a>, unless
            <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a> also
            is specified, in which case, a global read lock is acquired
            only for a short time at the beginning of the dump (see the
            description for
            <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a>). In
            all cases, any action on logs happens at the exact moment of
            the dump.
          </p><p>
            It is also possible to set up a slave by dumping an existing
            slave of the master, using the
            <a class="link" href="mysqldump.html#option_mysqldump_dump-slave"><code class="option">--dump-slave</code></a> option, which
            overrides <code class="option">--master-data</code> and causes it to be
            ignored if both options are used.
          </p></li><li class="listitem"><p><a name="option_mysqldump_set-gtid-purged"></a>
            <a class="indexterm" name="idm139663285546448"></a>

            <a class="indexterm" name="idm139663285544960"></a>

            <code class="option">--set-gtid-purged=<em class="replaceable"><code>value</code></em></code>
          </p><p>
            This option enables control over global transaction ID
            (GTID) information written to the dump file, by indicating
            whether to add a
            <a class="link" href="set-variable.html" title="13.7.5.1 SET Syntax for Variable Assignment"><code class="literal">SET
            @@GLOBAL.gtid_purged</code></a> statement to the output. This
            option may also cause a statement to be written to the
            output that disables binary logging while the dump file is
            being reloaded.
          </p><p>
            The following table shows the permitted option values. The
            default value is <code class="literal">AUTO</code>.
</p>
<div class="informaltable">
<table summary="Permitted option values for the mysqldump --set-gtid-purged option."><col width="10%"><col width="90%"><thead><tr>
                <th scope="col">Value</th>
                <th scope="col">Meaning</th>
              </tr></thead><tbody><tr>
                <td scope="row"><code class="literal">OFF</code></td>
                <td>Add no <code class="literal">SET</code> statement to the output.</td>
              </tr><tr>
                <td scope="row"><code class="literal">ON</code></td>
                <td>Add a <code class="literal">SET</code> statement to the output. An error occurs if
                  GTIDs are not enabled on the server.</td>
              </tr><tr>
                <td scope="row"><code class="literal">AUTO</code></td>
                <td>Add a <code class="literal">SET</code> statement to the output if GTIDs are
                  enabled on the server.</td>
</tr></tbody></table>
</div>
<p>
            A partial dump from a server that is using GTID-based
            replication requires the
            <a class="link" href="mysqlpump.html#option_mysqlpump_set-gtid-purged"><code class="option">--set-gtid-purged={ON|OFF}</code></a>
            option to be specified. Use <code class="literal">ON</code> if the
            intention is to deploy a new replication slave using only
            some of the data from the dumped server. Use
            <code class="literal">OFF</code> if the intention is to repair a table
            by copying it within a topology. Use <code class="literal">OFF</code>
            if the intention is to copy a table between replication
            topologies that are disjoint and will remain so.
          </p><p>
            The <code class="option">--set-gtid-purged</code> option has the
            following effect on binary logging when the dump file is
            reloaded:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                <code class="option">--set-gtid-purged=OFF</code>: <code class="literal">SET
                @@SESSION.SQL_LOG_BIN=0;</code> is not added to the
                output.
              </p></li><li class="listitem"><p>
                <code class="option">--set-gtid-purged=ON</code>: <code class="literal">SET
                @@SESSION.SQL_LOG_BIN=0;</code> is added to the
                output.
              </p></li><li class="listitem"><p>
                <code class="option">--set-gtid-purged=AUTO</code>: <code class="literal">SET
                @@SESSION.SQL_LOG_BIN=0;</code> is added to the
                output if GTIDs are enabled on the server you are
                backing up (that is, if <code class="literal">AUTO</code>
                evaluates to <code class="literal">ON</code>).
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
              It is not recommended to load a dump file when GTIDs are
              enabled on the server
              (<a class="link" href="replication-options-gtids.html#sysvar_gtid_mode"><code class="literal">gtid_mode=ON</code></a>),
              if your dump file includes system tables.
              <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> issues DML instructions for
              the system tables which use the non-transactional MyISAM
              storage engine, and this combination is not permitted when
              GTIDs are enabled. Also be aware that loading a dump file
              from a server with GTIDs enabled, into another server with
              GTIDs enabled, causes different transaction identifiers to
              be generated.
</p>
</div>
</li></ul>
</div>
<h4><a name="mysqldump-format-options"></a>Format Options</h4>
<p>
        The following options specify how to represent the entire dump
        file or certain kinds of data in the dump file. They also
        control whether certain optional information is written to the
        dump file.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_compact"></a>
            <a class="indexterm" name="idm139663285503360"></a>

            <a class="indexterm" name="idm139663285501872"></a>

            <code class="option">--compact</code>
          </p><p>
            Produce more compact output. This option enables the
            <a class="link" href="mysqldump.html#option_mysqldump_add-drop-table"><code class="option">--skip-add-drop-table</code></a>,
            <a class="link" href="mysqldump.html#option_mysqldump_add-locks"><code class="option">--skip-add-locks</code></a>,
            <a class="link" href="mysqldump.html#option_mysqldump_skip-comments"><code class="option">--skip-comments</code></a>,
            <a class="link" href="mysqldump.html#option_mysqldump_disable-keys"><code class="option">--skip-disable-keys</code></a>,
            and
            <a class="link" href="mysqldump.html#option_mysqldump_set-charset"><code class="option">--skip-set-charset</code></a>
            options.
          </p></li><li class="listitem"><p><a name="option_mysqldump_compatible"></a>
            <a class="indexterm" name="idm139663285493328"></a>

            <a class="indexterm" name="idm139663285491840"></a>

            <code class="option">--compatible=<em class="replaceable"><code>name</code></em></code>
          </p><p>
            Produce output that is more compatible with other database
            systems or with older MySQL servers. The only permitted
            value for this option is <code class="literal">ansi</code>, which has
            the same meaning as the corresponding option for setting the
            server SQL mode. See <a class="xref" href="sql-mode.html" title="5.1.11 Server SQL Modes">Section 5.1.11, “Server SQL Modes”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_complete-insert"></a>
            <a class="indexterm" name="idm139663285486416"></a>

            <a class="indexterm" name="idm139663285484928"></a>

            <code class="option">--complete-insert</code>, <code class="option">-c</code>
          </p><p>
            Use complete <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>
            statements that include column names.
          </p></li><li class="listitem"><p><a name="option_mysqldump_create-options"></a>
            <a class="indexterm" name="idm139663285479696"></a>

            <a class="indexterm" name="idm139663285478208"></a>

            <code class="option">--create-options</code>
          </p><p>
            Include all MySQL-specific table options in the
            <a class="link" href="create-table.html" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a> statements.
          </p></li><li class="listitem"><p><a name="option_mysqldump_fields"></a>
            <a class="indexterm" name="idm139663285473472"></a>

            <a class="indexterm" name="idm139663285472000"></a>

            <code class="option">--fields-terminated-by=...</code>,

            <a class="indexterm" name="idm139663285469760"></a>

            <a class="indexterm" name="idm139663285468256"></a>

            <code class="option">--fields-enclosed-by=...</code>,

            <a class="indexterm" name="idm139663285466016"></a>

            <a class="indexterm" name="idm139663285464512"></a>

            <code class="option">--fields-optionally-enclosed-by=...</code>,

            <a class="indexterm" name="idm139663285462272"></a>

            <a class="indexterm" name="idm139663285460768"></a>

            <code class="option">--fields-escaped-by=...</code>
          </p><p>
            These options are used with the
            <a class="link" href="mysqldump.html#option_mysqldump_tab"><code class="option">--tab</code></a> option and have the
            same meaning as the corresponding <code class="literal">FIELDS</code>
            clauses for <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>. See
            <a class="xref" href="load-data.html" title="13.2.7 LOAD DATA Syntax">Section 13.2.7, “LOAD DATA Syntax”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_hex-blob"></a>
            <a class="indexterm" name="idm139663285453184"></a>

            <a class="indexterm" name="idm139663285451696"></a>

            <code class="option">--hex-blob</code>
          </p><p>
            Dump binary columns using hexadecimal notation (for example,
            <code class="literal">'abc'</code> becomes
            <code class="literal">0x616263</code>). The affected data types are
            <a class="link" href="binary-varbinary.html" title="11.4.2 The BINARY and VARBINARY Types"><code class="literal">BINARY</code></a>,
            <a class="link" href="binary-varbinary.html" title="11.4.2 The BINARY and VARBINARY Types"><code class="literal">VARBINARY</code></a>, the
            <a class="link" href="blob.html" title="11.4.3 The BLOB and TEXT Types"><code class="literal">BLOB</code></a> types, and
            <a class="link" href="bit-type.html" title="11.2.4 Bit-Value Type - BIT"><code class="literal">BIT</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_lines-terminated-by"></a>
            <a class="indexterm" name="idm139663285441536"></a>

            <a class="indexterm" name="idm139663285440080"></a>

            <code class="option">--lines-terminated-by=...</code>
          </p><p>
            This option is used with the
            <a class="link" href="mysqldump.html#option_mysqldump_tab"><code class="option">--tab</code></a> option and has the
            same meaning as the corresponding <code class="literal">LINES</code>
            clause for <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>. See
            <a class="xref" href="load-data.html" title="13.2.7 LOAD DATA Syntax">Section 13.2.7, “LOAD DATA Syntax”</a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_quote-names"></a>
            <a class="indexterm" name="idm139663285432832"></a>

            <a class="indexterm" name="idm139663285431344"></a>

            <code class="option">--quote-names</code>, <code class="option">-Q</code>
          </p><p>
            Quote identifiers (such as database, table, and column
            names) within <code class="literal">`</code> characters. If the
            <a class="link" href="sql-mode.html#sqlmode_ansi_quotes"><code class="literal">ANSI_QUOTES</code></a> SQL mode is
            enabled, identifiers are quoted within <code class="literal">"</code>
            characters. This option is enabled by default. It can be
            disabled with <code class="option">--skip-quote-names</code>, but this
            option should be given after any option such as
            <a class="link" href="mysqldump.html#option_mysqldump_compatible"><code class="option">--compatible</code></a> that may
            enable <a class="link" href="mysqldump.html#option_mysqldump_quote-names"><code class="option">--quote-names</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_result-file"></a>
            <a class="indexterm" name="idm139663285422016"></a>

            <a class="indexterm" name="idm139663285420528"></a>

            <code class="option">--result-file=<em class="replaceable"><code>file_name</code></em></code>,
            <code class="option">-r <em class="replaceable"><code>file_name</code></em></code>
          </p><p>
            Direct output to the named file. The result file is created
            and its previous contents overwritten, even if an error
            occurs while generating the dump.
          </p><p>
            This option should be used on Windows to prevent newline
            <code class="literal">\n</code> characters from being converted to
            <code class="literal">\r\n</code> carriage return/newline sequences.
          </p></li><li class="listitem"><p><a name="option_mysqldump_tab"></a>
            <a class="indexterm" name="idm139663285413920"></a>

            <a class="indexterm" name="idm139663285412464"></a>

            <code class="option">--tab=<em class="replaceable"><code>dir_name</code></em></code>,
            <code class="option">-T <em class="replaceable"><code>dir_name</code></em></code>
          </p><p>
            Produce tab-separated text-format data files. For each
            dumped table, <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> creates a
            <code class="filename"><em class="replaceable"><code>tbl_name</code></em>.sql</code>
            file that contains the <a class="link" href="create-table.html" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE
            TABLE</code></a> statement that creates the table, and the
            server writes a
            <code class="filename"><em class="replaceable"><code>tbl_name</code></em>.txt</code>
            file that contains its data. The option value is the
            directory in which to write the files.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              This option should be used only when
              <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> is run on the same machine as
              the <a class="link" href="mysqld.html" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> server. Because the server
              creates <code class="filename">*.txt</code> files in the directory
              that you specify, the directory must be writable by the
              server and the MySQL account that you use must have the
              <a class="link" href="privileges-provided.html#priv_file"><code class="literal">FILE</code></a> privilege. Because
              <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> creates
              <code class="filename">*.sql</code> in the same directory, it must
              be writable by your system login account.
</p>
</div>
<p>
            By default, the <code class="filename">.txt</code> data files are
            formatted using tab characters between column values and a
            newline at the end of each line. The format can be specified
            explicitly using the
            <code class="option">--fields-<em class="replaceable"><code>xxx</code></em></code> and
            <a class="link" href="mysqldump.html#option_mysqldump_lines-terminated-by"><code class="option">--lines-terminated-by</code></a>
            options.
          </p><p>
            Column values are converted to the character set specified
            by the
            <a class="link" href="mysqldump.html#option_mysqldump_default-character-set"><code class="option">--default-character-set</code></a>
            option.
          </p></li><li class="listitem"><p><a name="option_mysqldump_tz-utc"></a>
            <a class="indexterm" name="idm139663285391120"></a>

            <a class="indexterm" name="idm139663285389664"></a>

            <code class="option">--tz-utc</code>
          </p><p>
            This option enables <a class="link" href="datetime.html" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a>
            columns to be dumped and reloaded between servers in
            different time zones. <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> sets its
            connection time zone to UTC and adds <code class="literal">SET
            TIME_ZONE='+00:00'</code> to the dump file. Without this
            option, <a class="link" href="datetime.html" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> columns are
            dumped and reloaded in the time zones local to the source
            and destination servers, which can cause the values to
            change if the servers are in different time zones.
            <code class="option">--tz-utc</code> also protects against changes due
            to daylight saving time. <code class="option">--tz-utc</code> is
            enabled by default. To disable it, use
            <code class="option">--skip-tz-utc</code>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_xml"></a>
            <a class="indexterm" name="idm139663285379840"></a>

            <a class="indexterm" name="idm139663285378384"></a>

            <code class="option">--xml</code>, <code class="option">-X</code>
          </p><p>
            Write dump output as well-formed XML.
          </p><p>
            <span class="bold"><strong><code class="literal">NULL</code>,
            <code class="literal">'NULL'</code>, and Empty Values</strong></span>: For
            a column named <em class="replaceable"><code>column_name</code></em>, the
            <code class="literal">NULL</code> value, an empty string, and the
            string value <code class="literal">'NULL'</code> are distinguished
            from one another in the output generated by this option as
            follows.
</p>
<div class="informaltable">
<table summary="For a column named column_name, the NULL value, an empty string, and the string value 'NULL' are distinguished from one another in the XML output generated by the mysqldump --xml, -X option, as shown in this table."><col width="50%"><col width="50%"><thead><tr>
                <th scope="col">Value:</th>
                <th scope="col">XML Representation:</th>
              </tr></thead><tbody><tr>
                <td scope="row"><code class="literal">NULL</code> (<span class="emphasis"><em>unknown value</em></span>)</td>
                <td><p>
                    <code class="literal">&lt;field
                    name="<em class="replaceable"><code>column_name</code></em>"
                    xsi:nil="true" /&gt;</code>
                  </p></td>
              </tr><tr>
                <td scope="row"><code class="literal">''</code> (<span class="emphasis"><em>empty string</em></span>)</td>
                <td><p>
                    <code class="literal">&lt;field
                    name="<em class="replaceable"><code>column_name</code></em>"&gt;&lt;/field&gt;</code>
                  </p></td>
              </tr><tr>
                <td scope="row"><code class="literal">'NULL'</code> (<span class="emphasis"><em>string value</em></span>)</td>
                <td><p>
                    <code class="literal">&lt;field
                    name="<em class="replaceable"><code>column_name</code></em>"&gt;NULL&lt;/field&gt;</code>
                  </p></td>
</tr></tbody></table>
</div>
<p>
            The output from the <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> client when run
            using the <a class="link" href="mysql-command-options.html#option_mysql_xml"><code class="option">--xml</code></a> option also
            follows the preceding rules. (See
            <a class="xref" href="mysql-command-options.html" title="4.5.1.1 mysql Client Options">Section 4.5.1.1, “mysql Client Options”</a>.)
          </p><p>
            XML output from <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> includes the
            XML namespace, as shown here:
          </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqldump --xml -u root world City
&lt;?xml version="1.0"?&gt;
&lt;mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
&lt;database name="world"&gt;
&lt;table_structure name="City"&gt;
&lt;field Field="ID" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" /&gt;
&lt;field Field="Name" Type="char(35)" Null="NO" Key="" Default="" Extra="" /&gt;
&lt;field Field="CountryCode" Type="char(3)" Null="NO" Key="" Default="" Extra="" /&gt;
&lt;field Field="District" Type="char(20)" Null="NO" Key="" Default="" Extra="" /&gt;
&lt;field Field="Population" Type="int(11)" Null="NO" Key="" Default="0" Extra="" /&gt;
&lt;key Table="City" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="ID"
Collation="A" Cardinality="4079" Null="" Index_type="BTREE" Comment="" /&gt;
&lt;options Name="City" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="4079"
Avg_row_length="67" Data_length="273293" Max_data_length="18858823439613951"
Index_length="43008" Data_free="0" Auto_increment="4080"
Create_time="2007-03-31 01:47:01" Update_time="2007-03-31 01:47:02"
Collation="latin1_swedish_ci" Create_options="" Comment="" /&gt;
&lt;/table_structure&gt;
&lt;table_data name="City"&gt;
&lt;row&gt;
&lt;field name="ID"&gt;1&lt;/field&gt;
&lt;field name="Name"&gt;Kabul&lt;/field&gt;
&lt;field name="CountryCode"&gt;AFG&lt;/field&gt;
&lt;field name="District"&gt;Kabol&lt;/field&gt;
&lt;field name="Population"&gt;1780000&lt;/field&gt;
&lt;/row&gt;

<em class="replaceable">...</em>

&lt;row&gt;
&lt;field name="ID"&gt;4079&lt;/field&gt;
&lt;field name="Name"&gt;Rafah&lt;/field&gt;
&lt;field name="CountryCode"&gt;PSE&lt;/field&gt;
&lt;field name="District"&gt;Rafah&lt;/field&gt;
&lt;field name="Population"&gt;92020&lt;/field&gt;
&lt;/row&gt;
&lt;/table_data&gt;
&lt;/database&gt;
&lt;/mysqldump&gt;</code></pre></li></ul>
</div>
<h4><a name="mysqldump-filter-options"></a>Filtering Options</h4>
<p>
        The following options control which kinds of schema objects are
        written to the dump file: by category, such as triggers or
        events; by name, for example, choosing which databases and
        tables to dump; or even filtering rows from the table data using
        a <code class="literal">WHERE</code> clause.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_all-databases"></a>
            <a class="indexterm" name="idm139663285338304"></a>

            <a class="indexterm" name="idm139663285336816"></a>

            <code class="option">--all-databases</code>, <code class="option">-A</code>
          </p><p>
            Dump all tables in all databases. This is the same as using
            the <a class="link" href="mysqldump.html#option_mysqldump_databases"><code class="option">--databases</code></a> option and
            naming all the databases on the command line.
          </p><p>
            Prior to MySQL 8.0, the
            <a class="link" href="mysqldump.html#option_mysqldump_routines"><code class="option">--routines</code></a> and
            <a class="link" href="mysqldump.html#option_mysqldump_events"><code class="option">--events</code></a> options for
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> and
            <a class="link" href="mysqlpump.html" title="4.5.6 mysqlpump — A Database Backup Program"><span class="command"><strong>mysqlpump</strong></span></a> were not required to include
            stored routines and events when using the
            <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option:
            The dump included the <code class="literal">mysql</code> system
            database, and therefore also the
            <code class="literal">mysql.proc</code> and
            <code class="literal">mysql.event</code> tables containing stored
            routine and event definitions. As of MySQL 8.0,
            the <code class="literal">mysql.event</code> and
            <code class="literal">mysql.proc</code> tables are not used.
            Definitions for the corresponding objects are stored in data
            dictionary tables, but those tables are not dumped. To
            include stored routines and events in a dump made using
            <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a>, use the
            <a class="link" href="mysqldump.html#option_mysqldump_routines"><code class="option">--routines</code></a> and
            <a class="link" href="mysqldump.html#option_mysqldump_events"><code class="option">--events</code></a> options
            explicitly.
          </p></li><li class="listitem"><p><a name="option_mysqldump_databases"></a>
            <a class="indexterm" name="idm139663285318832"></a>

            <a class="indexterm" name="idm139663285317344"></a>

            <code class="option">--databases</code>, <code class="option">-B</code>
          </p><p>
            Dump several databases. Normally,
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> treats the first name argument
            on the command line as a database name and following names
            as table names. With this option, it treats all name
            arguments as database names. <a class="link" href="create-database.html" title="13.1.12 CREATE DATABASE Syntax"><code class="literal">CREATE
            DATABASE</code></a> and <a class="link" href="use.html" title="13.8.4 USE Syntax"><code class="literal">USE</code></a>
            statements are included in the output before each new
            database.
          </p><p>
            This option may be used to dump the
            <code class="literal">performance_schema</code> database, which
            normally is not dumped even with the
            <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option.
            (Also use the
            <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--skip-lock-tables</code></a>
            option.)
          </p></li><li class="listitem"><p><a name="option_mysqldump_events"></a>
            <a class="indexterm" name="idm139663285306208"></a>

            <a class="indexterm" name="idm139663285304752"></a>

            <code class="option">--events</code>, <code class="option">-E</code>
          </p><p>
            Include Event Scheduler events for the dumped databases in
            the output. This option requires the
            <a class="link" href="privileges-provided.html#priv_event"><code class="literal">EVENT</code></a> privileges for those
            databases.
          </p><p>
            The output generated by using <code class="option">--events</code>
            contains <a class="link" href="create-event.html" title="13.1.13 CREATE EVENT Syntax"><code class="literal">CREATE EVENT</code></a>
            statements to create the events.
          </p></li><li class="listitem"><p><a name="option_mysqldump_ignore-error"></a>
            <a class="indexterm" name="idm139663285297040"></a>

            <a class="indexterm" name="idm139663285295552"></a>

            <code class="option">--ignore-error=<em class="replaceable"><code>error[,error]...</code></em></code>
          </p><p>
            Ignore the specified errors. The option value is a list of
            comma-separated error numbers specifying the errors to
            ignore during <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> execution. If the
            <a class="link" href="mysqldump.html#option_mysqldump_force"><code class="option">--force</code></a> option is also
            given to ignore all errors,
            <a class="link" href="mysqldump.html#option_mysqldump_force"><code class="option">--force</code></a> takes precedence.
          </p></li><li class="listitem"><p><a name="option_mysqldump_ignore-table"></a>
            <a class="indexterm" name="idm139663285288336"></a>

            <a class="indexterm" name="idm139663285286848"></a>

            <code class="option">--ignore-table=<em class="replaceable"><code>db_name.tbl_name</code></em></code>
          </p><p>
            Do not dump the given table, which must be specified using
            both the database and table names. To ignore multiple
            tables, use this option multiple times. This option also can
            be used to ignore views.
          </p></li><li class="listitem"><p><a name="option_mysqldump_no-data"></a>
            <a class="indexterm" name="idm139663285282832"></a>

            <a class="indexterm" name="idm139663285281344"></a>

            <code class="option">--no-data</code>, <code class="option">-d</code>
          </p><p>
            Do not write any table row information (that is, do not dump
            table contents). This is useful if you want to dump only the
            <a class="link" href="create-table.html" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a> statement for
            the table (for example, to create an empty copy of the table
            by loading the dump file).
          </p></li><li class="listitem"><p><a name="option_mysqldump_routines"></a>
            <a class="indexterm" name="idm139663285275968"></a>

            <a class="indexterm" name="idm139663285274480"></a>

            <code class="option">--routines</code>, <code class="option">-R</code>
          </p><p>
            Include stored routines (procedures and functions) for the
            dumped databases in the output. This option requires the
            global <a class="link" href="privileges-provided.html#priv_select"><code class="literal">SELECT</code></a> privilege.
          </p><p>
            The output generated by using <code class="option">--routines</code>
            contains <a class="link" href="create-procedure.html" title="13.1.17 CREATE PROCEDURE and CREATE FUNCTION Syntax"><code class="literal">CREATE PROCEDURE</code></a> and
            <a class="link" href="create-function.html" title="13.1.14 CREATE FUNCTION Syntax"><code class="literal">CREATE FUNCTION</code></a> statements to
            create the routines.
          </p></li><li class="listitem"><p><a name="option_mysqldump_tables"></a>
            <a class="indexterm" name="idm139663285265648"></a>

            <a class="indexterm" name="idm139663285264192"></a>

            <code class="option">--tables</code>
          </p><p>
            Override the <a class="link" href="mysqldump.html#option_mysqldump_databases"><code class="option">--databases</code></a>
            or <code class="option">-B</code> option. <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a>
            regards all name arguments following the option as table
            names.
          </p></li><li class="listitem"><p><a name="option_mysqldump_triggers"></a>
            <a class="indexterm" name="idm139663285257920"></a>

            <a class="indexterm" name="idm139663285256432"></a>

            <code class="option">--triggers</code>
          </p><p>
            Include triggers for each dumped table in the output. This
            option is enabled by default; disable it with
            <code class="option">--skip-triggers</code>.
          </p><p>
            To be able to dump a table's triggers, you must have the
            <a class="link" href="privileges-provided.html#priv_trigger"><code class="literal">TRIGGER</code></a> privilege for the
            table.
          </p><p>
            Multiple triggers are permitted.
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> dumps triggers in activation
            order so that when the dump file is reloaded, triggers are
            created in the same activation order. However, if a
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> dump file contains multiple
            triggers for a table that have the same trigger event and
            action time, an error occurs for attempts to load the dump
            file into an older server that does not support multiple
            triggers. (For a workaround, see
            <a class="ulink" href="https://dev.mysql.com/doc/refman/5.7/en/downgrading-to-previous-series.html" target="_top">Downgrade Notes</a>;
            you can convert triggers to be compatible with older
            servers.)
          </p></li><li class="listitem"><p><a name="option_mysqldump_where"></a>
            <a class="indexterm" name="idm139663285246368"></a>

            <a class="indexterm" name="idm139663285244912"></a>

            <code class="option">--where='<em class="replaceable"><code>where_condition</code></em>'</code>,
            <code class="option">-w
            '<em class="replaceable"><code>where_condition</code></em>'</code>
          </p><p>
            Dump only rows selected by the given
            <code class="literal">WHERE</code> condition. Quotes around the
            condition are mandatory if it contains spaces or other
            characters that are special to your command interpreter.

            
          </p><p>
            Examples:
          </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">--where="user='jimf'"
-w"userid&gt;1"
-w"userid&lt;1"</code></pre></li></ul>
</div>
<h4><a name="mysqldump-performance-options"></a>Performance Options</h4>
<p>
        The following options are the most relevant for the performance
        particularly of the restore operations. For large data sets,
        restore operation (processing the <code class="literal">INSERT</code>
        statements in the dump file) is the most time-consuming part.
        When it is urgent to restore data quickly, plan and test the
        performance of this stage in advance. For restore times measured
        in hours, you might prefer an alternative backup and restore
        solution, such as <a class="link" href="mysql-enterprise-backup.html" title="30.2 MySQL Enterprise Backup Overview">MySQL
        Enterprise Backup</a> for <code class="literal">InnoDB</code>-only and
        mixed-use databases.

        
      </p><p>
        Performance is also affected by the
        <a class="link" href="mysqldump.html#mysqldump-transaction-options" title="Transactional Options">transactional
        options</a>, primarily for the dump operation.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_column-statistics"></a>
            <a class="link" href="mysqldump.html#option_mysqldump_column-statistics"><code class="option">--column-statistics</code></a>
          </p><a class="indexterm" name="idm139663285228848"></a><a class="indexterm" name="idm139663285227392"></a><p>
            Add <a class="link" href="analyze-table.html" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE TABLE</code></a> statements
            to the output to generate histogram statistics for dumped
            tables when the dump file is reloaded. This option is
            disabled by default because histogram generation for large
            tables can take a long time.
          </p></li><li class="listitem"><p><a name="option_mysqldump_disable-keys"></a>
            <a class="indexterm" name="idm139663285222896"></a>

            <a class="indexterm" name="idm139663285221408"></a>

            <code class="option">--disable-keys</code>, <code class="option">-K</code>
          </p><p>
            For each table, surround the
            <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements with
            <code class="literal">/*!40000 ALTER TABLE
            <em class="replaceable"><code>tbl_name</code></em> DISABLE KEYS
            */;</code> and <code class="literal">/*!40000 ALTER TABLE
            <em class="replaceable"><code>tbl_name</code></em> ENABLE KEYS
            */;</code> statements. This makes loading the dump file
            faster because the indexes are created after all rows are
            inserted. This option is effective only for nonunique
            indexes of <code class="literal">MyISAM</code> tables.
          </p></li><li class="listitem"><p><a name="option_mysqldump_extended-insert"></a>
            <a class="indexterm" name="idm139663285212832"></a>

            <a class="indexterm" name="idm139663285211344"></a>

            <code class="option">--extended-insert</code>, <code class="option">-e</code>
          </p><p>
            Write <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements using
            multiple-row syntax that includes several
            <code class="literal">VALUES</code> lists. This results in a smaller
            dump file and speeds up inserts when the file is reloaded.
          </p></li><li class="listitem"><p><a name="option_mysqldump_insert-ignore"></a>
            <a class="indexterm" name="idm139663285205296"></a>

            <a class="indexterm" name="idm139663285203808"></a>

            <code class="option">--insert-ignore</code>
          </p><p>
            Write <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT
            IGNORE</code></a> statements rather than
            <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements.
          </p></li><li class="listitem"><p><a name="option_mysqldump_max-allowed-packet"></a>
            <a class="link" href="mysqldump.html#option_mysqldump_max-allowed-packet"><code class="option">--max-allowed-packet=<em class="replaceable"><code>value</code></em></code></a>
          </p><a class="indexterm" name="idm139663285196448"></a><a class="indexterm" name="idm139663285194992"></a><p>
            The maximum size of the buffer for client/server
            communication. The default is 24MB, the maximum is 1GB.
          </p></li><li class="listitem"><p><a name="option_mysqldump_net-buffer-length"></a>
            <a class="link" href="mysqldump.html#option_mysqldump_net-buffer-length"><code class="option">--net-buffer-length=<em class="replaceable"><code>value</code></em></code></a>
          </p><a class="indexterm" name="idm139663285190480"></a><a class="indexterm" name="idm139663285189024"></a><p>
            The initial size of the buffer for client/server
            communication. When creating multiple-row
            <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements (as with
            the <a class="link" href="mysqldump.html#option_mysqldump_extended-insert"><code class="option">--extended-insert</code></a> or
            <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> option),
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> creates rows up to
            <a class="link" href="mysqldump.html#option_mysqldump_net-buffer-length"><code class="option">--net-buffer-length</code></a> bytes
            long. If you increase this variable, ensure that the MySQL
            server <a class="link" href="server-system-variables.html#sysvar_net_buffer_length"><code class="literal">net_buffer_length</code></a>
            system variable has a value at least this large.
          </p></li><li class="listitem"><p><a name="option_mysqldump_network-timeout"></a>
            <a class="indexterm" name="idm139663285178816"></a>

            <a class="indexterm" name="idm139663285177328"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_network-timeout"><code class="option">--network-timeout</code></a>,
            <code class="option">-M</code>
          </p><p>
            Enable large tables to be dumped by setting
            <a class="link" href="mysqldump.html#option_mysqldump_max-allowed-packet"><code class="option">--max-allowed-packet</code></a> to
            its maximum value and network read and write timeouts to a
            large value. This option is enabled by default. To disable
            it, use
            <a class="link" href="mysqldump.html#option_mysqldump_network-timeout"><code class="option">--skip-network-timeout</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_opt"></a>
            <a class="indexterm" name="idm139663285170640"></a>

            <a class="indexterm" name="idm139663285169184"></a>

            <code class="option">--opt</code>
          </p><p>
            This option, enabled by default, is shorthand for the
            combination of
            <a class="link" href="mysqldump.html#option_mysqldump_add-drop-table"><code class="option">--add-drop-table</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_add-locks"><code class="option">--add-locks</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_create-options"><code class="option">--create-options</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_disable-keys"><code class="option">--disable-keys</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_extended-insert"><code class="option">--extended-insert</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--lock-tables</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--quick</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_set-charset"><code class="option">--set-charset</code></a>. It gives a
            fast dump operation and produces a dump file that can be
            reloaded into a MySQL server quickly.
          </p><p>
            Because the <code class="option">--opt</code> option is enabled by
            default, you only specify its converse, the
            <a class="link" href="mysqldump.html#option_mysqldump_skip-opt"><code class="option">--skip-opt</code></a> to turn off
            several default settings. See the discussion of
            <a class="link" href="mysqldump.html#mysqldump-option-groups" title="Option Groups"><code class="literal">mysqldump</code>
            option groups</a> for information about selectively
            enabling or disabling a subset of the options affected by
            <code class="option">--opt</code>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_quick"></a>
            <a class="indexterm" name="idm139663285153872"></a>

            <a class="indexterm" name="idm139663285152416"></a>

            <code class="option">--quick</code>, <code class="option">-q</code>
          </p><p>
            This option is useful for dumping large tables. It forces
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to retrieve rows for a table
            from the server a row at a time rather than retrieving the
            entire row set and buffering it in memory before writing it
            out.
          </p></li><li class="listitem"><p><a name="option_mysqldump_skip-opt"></a>
            <a class="indexterm" name="idm139663285147008"></a>

            <a class="indexterm" name="idm139663285145520"></a>

            <code class="option">--skip-opt</code>
          </p><p>
            See the description for the
            <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> option.

            
</p></li></ul>
</div>
<h4><a name="mysqldump-transaction-options"></a>Transactional Options</h4>
<p>
        The following options trade off the performance of the dump
        operation, against the reliability and consistency of the
        exported data.

        
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a name="option_mysqldump_add-locks"></a>
            <a class="indexterm" name="idm139663285137392"></a>

            <a class="indexterm" name="idm139663285135904"></a>

            <code class="option">--add-locks</code>
          </p><p>
            Surround each table dump with <a class="link" href="lock-tables.html" title="13.3.6 LOCK TABLES and UNLOCK TABLES Syntax"><code class="literal">LOCK
            TABLES</code></a> and
            <a class="link" href="lock-tables.html" title="13.3.6 LOCK TABLES and UNLOCK TABLES Syntax"><code class="literal">UNLOCK
            TABLES</code></a> statements. This results in faster inserts
            when the dump file is reloaded. See
            <a class="xref" href="insert-optimization.html" title="8.2.5.1 Optimizing INSERT Statements">Section 8.2.5.1, “Optimizing INSERT Statements”</a>.

            
          </p></li><li class="listitem"><p><a name="option_mysqldump_flush-logs"></a>
            <a class="indexterm" name="idm139663285128272"></a>

            <a class="indexterm" name="idm139663285126784"></a>

            <code class="option">--flush-logs</code>, <code class="option">-F</code>
          </p><p>
            Flush the MySQL server log files before starting the dump.
            This option requires the
            <a class="link" href="privileges-provided.html#priv_reload"><code class="literal">RELOAD</code></a> privilege. If you use
            this option in combination with the
            <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option,
            the logs are flushed <span class="emphasis"><em>for each database
            dumped</em></span>. The exception is when using
            <a class="link" href="mysqldump.html#option_mysqldump_lock-all-tables"><code class="option">--lock-all-tables</code></a>,
            <a class="link" href="mysqldump.html#option_mysqldump_master-data"><code class="option">--master-data</code></a>, or
            <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a>: In
            this case, the logs are flushed only once, corresponding to
            the moment that all tables are locked by
            <a class="link" href="flush.html#flush-tables-with-read-lock"><code class="literal">FLUSH TABLES WITH READ LOCK</code></a>.
            If you want your dump and the log flush to happen at exactly
            the same moment, you should use
            <code class="option">--flush-logs</code> together with
            <a class="link" href="mysqldump.html#option_mysqldump_lock-all-tables"><code class="option">--lock-all-tables</code></a>,
            <a class="link" href="mysqldump.html#option_mysqldump_master-data"><code class="option">--master-data</code></a>, or
            <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_flush-privileges"></a>
            <a class="indexterm" name="idm139663285111808"></a>

            <a class="indexterm" name="idm139663285110320"></a>

            <code class="option">--flush-privileges</code>
          </p><p>
            Add a <a class="link" href="flush.html#flush-privileges"><code class="literal">FLUSH PRIVILEGES</code></a>
            statement to the dump output after dumping the
            <code class="literal">mysql</code> database. This option should be
            used any time the dump contains the <code class="literal">mysql</code>
            database and any other database that depends on the data in
            the <code class="literal">mysql</code> database for proper
            restoration.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              For upgrades to MySQL 5.7.2 or higher from older versions,
              do not use <code class="option">--flush-privileges</code>. For
              upgrade instructions in this case, see
              <a class="xref" href="upgrading-from-previous-series.html" title="2.11.4 Changes in MySQL 8.0">Section 2.11.4, “Changes in MySQL 8.0”</a>.
</p>
</div>
</li><li class="listitem"><p><a name="option_mysqldump_lock-all-tables"></a>
            <a class="indexterm" name="idm139663285100352"></a>

            <a class="indexterm" name="idm139663285098864"></a>

            <code class="option">--lock-all-tables</code>, <code class="option">-x</code>
          </p><p>
            Lock all tables across all databases. This is achieved by
            acquiring a global read lock for the duration of the whole
            dump. This option automatically turns off
            <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a> and
            <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--lock-tables</code></a>.
          </p></li><li class="listitem"><p><a name="option_mysqldump_lock-tables"></a>
            <a class="indexterm" name="idm139663285092768"></a>

            <a class="indexterm" name="idm139663285091280"></a>

            <code class="option">--lock-tables</code>, <code class="option">-l</code>
          </p><p>
            For each dumped database, lock all tables to be dumped
            before dumping them. The tables are locked with
            <code class="literal">READ LOCAL</code> to permit concurrent inserts
            in the case of <code class="literal">MyISAM</code> tables. For
            transactional tables such as <code class="literal">InnoDB</code>,
            <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a> is a
            much better option than <code class="option">--lock-tables</code>
            because it does not need to lock the tables at all.
          </p><p>
            Because <code class="option">--lock-tables</code> locks tables for each
            database separately, this option does not guarantee that the
            tables in the dump file are logically consistent between
            databases. Tables in different databases may be dumped in
            completely different states.
          </p><p>
            Some options, such as
            <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a>, automatically
            enable <code class="option">--lock-tables</code>. If you want to
            override this, use <code class="option">--skip-lock-tables</code> at
            the end of the option list.
          </p></li><li class="listitem"><p><a name="option_mysqldump_no-autocommit"></a>
            <a class="indexterm" name="idm139663285079936"></a>

            <a class="indexterm" name="idm139663285078448"></a>

            <code class="option">--no-autocommit</code>
          </p><p>
            Enclose the <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements
            for each dumped table within <code class="literal">SET autocommit =
            0</code> and <a class="link" href="commit.html" title="13.3.1 START TRANSACTION, COMMIT, and ROLLBACK Syntax"><code class="literal">COMMIT</code></a>
            statements.
          </p></li><li class="listitem"><p><a name="option_mysqldump_order-by-primary"></a>
            <a class="indexterm" name="idm139663285071696"></a>

            <a class="indexterm" name="idm139663285070208"></a>

            <code class="option">--order-by-primary</code>
          </p><p>
            

            Dump each table's rows sorted by its primary key, or by its
            first unique index, if such an index exists. This is useful
            when dumping a <code class="literal">MyISAM</code> table to be loaded
            into an <code class="literal">InnoDB</code> table, but makes the dump
            operation take considerably longer.
          </p></li><li class="listitem"><p><a name="option_mysqldump_shared-memory-base-name"></a>
            <a class="indexterm" name="idm139663285063920"></a>

            <a class="indexterm" name="idm139663285062464"></a>

            <a class="link" href="mysqldump.html#option_mysqldump_shared-memory-base-name"><code class="option">--shared-memory-base-name=<em class="replaceable"><code>name</code></em></code></a>
          </p><p>
            On Windows, the shared-memory name to use, for connections
            made using shared memory to a local server. The default
            value is <code class="literal">MYSQL</code>. The shared-memory name is
            case-sensitive.
          </p><p>
            This option applies only if the server was started with the
            <a class="link" href="server-system-variables.html#sysvar_shared_memory"><code class="literal">shared_memory</code></a> system
            variable enabled to support shared-memory connections.
          </p></li><li class="listitem"><p><a name="option_mysqldump_single-transaction"></a>
            <a class="indexterm" name="idm139663285055408"></a>

            <a class="indexterm" name="idm139663285053952"></a>

            <code class="option">--single-transaction</code>
          </p><p>
            This option sets the transaction isolation mode to
            <a class="link" href="innodb-transaction-isolation-levels.html#isolevel_repeatable-read"><code class="literal">REPEATABLE READ</code></a> and sends
            a <a class="link" href="commit.html" title="13.3.1 START TRANSACTION, COMMIT, and ROLLBACK Syntax"><code class="literal">START
            TRANSACTION</code></a> SQL statement to the server before
            dumping data. It is useful only with transactional tables
            such as <code class="literal">InnoDB</code>, because then it dumps the
            consistent state of the database at the time when
            <a class="link" href="commit.html" title="13.3.1 START TRANSACTION, COMMIT, and ROLLBACK Syntax"><code class="literal">START
            TRANSACTION</code></a> was issued without blocking any
            applications.
          </p><p>
            When using this option, you should keep in mind that only
            <code class="literal">InnoDB</code> tables are dumped in a consistent
            state. For example, any <code class="literal">MyISAM</code> or
            <code class="literal">MEMORY</code> tables dumped while using this
            option may still change state.
          </p><p>
            While a
            <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a> dump
            is in process, to ensure a valid dump file (correct table
            contents and binary log coordinates), no other connection
            should use the following statements:
            <a class="link" href="alter-table.html" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER TABLE</code></a>,
            <a class="link" href="create-table.html" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a>,
            <a class="link" href="drop-table.html" title="13.1.32 DROP TABLE Syntax"><code class="literal">DROP TABLE</code></a>,
            <a class="link" href="rename-table.html" title="13.1.36 RENAME TABLE Syntax"><code class="literal">RENAME TABLE</code></a>,
            <a class="link" href="truncate-table.html" title="13.1.37 TRUNCATE TABLE Syntax"><code class="literal">TRUNCATE TABLE</code></a>. A consistent
            read is not isolated from those statements, so use of them
            on a table to be dumped can cause the
            <a class="link" href="select.html" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> that is performed by
            <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> to retrieve the table contents
            to obtain incorrect contents or fail.
          </p><p>
            The <code class="option">--single-transaction</code> option and the
            <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--lock-tables</code></a> option are
            mutually exclusive because <a class="link" href="lock-tables.html" title="13.3.6 LOCK TABLES and UNLOCK TABLES Syntax"><code class="literal">LOCK
            TABLES</code></a> causes any pending transactions to be
            committed implicitly.
          </p><p>
            To dump large tables, combine the
            <code class="option">--single-transaction</code> option with the
            <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--quick</code></a> option.
</p></li></ul>
</div>
<h4><a name="mysqldump-option-groups"></a>Option Groups</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            The <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> option turns on
            several settings that work together to perform a fast dump
            operation. All of these settings are on by default, because
            <code class="option">--opt</code> is on by default. Thus you rarely if
            ever specify <code class="literal">--opt</code>. Instead, you can turn
            these settings off as a group by specifying
            <code class="literal">--skip-opt</code>, the optionally re-enable
            certain settings by specifying the associated options later
            on the command line.
          </p></li><li class="listitem"><p>
            The <a class="link" href="mysqldump.html#option_mysqldump_compact"><code class="option">--compact</code></a> option turns
            off several settings that control whether optional
            statements and comments appear in the output. Again, you can
            follow this option with other options that re-enable certain
            settings, or turn all the settings on by using the
            <code class="literal">--skip-compact</code> form.
</p></li></ul>
</div>
<p>
        When you selectively enable or disable the effect of a group
        option, order is important because options are processed first
        to last. For example,
        <a class="link" href="mysqldump.html#option_mysqldump_disable-keys"><code class="option">--disable-keys</code></a>
        <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--lock-tables</code></a>
        <a class="link" href="mysqldump.html#option_mysqldump_skip-opt"><code class="option">--skip-opt</code></a> would not have the
        intended effect; it is the same as
        <a class="link" href="mysqldump.html#option_mysqldump_skip-opt"><code class="option">--skip-opt</code></a> by itself.
</p>
<h4><a name="mysqldump-option-examples"></a>Examples</h4>
<p>
        To make a backup of an entire database:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump <em class="replaceable">db_name</em> &gt; <em class="replaceable">backup-file.sql</em></code></pre><p>
        To load the dump file back into the server:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysql <em class="replaceable">db_name</em> &lt; <em class="replaceable">backup-file.sql</em></code></pre><p>
        Another way to reload the dump file:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysql -e "source <em class="replaceable">/path-to-backup/backup-file.sql</em>" <em class="replaceable">db_name</em></code></pre><p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> is also very useful for populating
        databases by copying data from one MySQL server to another:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump --opt <em class="replaceable">db_name</em> | mysql --host=<em class="replaceable">remote_host</em> -C <em class="replaceable">db_name</em></code></pre><p>
        You can dump several databases with one command:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump --databases <em class="replaceable">db_name1</em> [<em class="replaceable">db_name2</em> ...] &gt; my_databases.sql</code></pre><p>
        To dump all databases, use the
        <a class="link" href="mysqldump.html#option_mysqldump_all-databases"><code class="option">--all-databases</code></a> option:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump --all-databases &gt; all_databases.sql</code></pre><p>
        For <code class="literal">InnoDB</code> tables,
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> provides a way of making an online
        backup:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump --all-databases --master-data --single-transaction &gt; all_databases.sql</code></pre><p>
        This backup acquires a global read lock on all tables (using
        <a class="link" href="flush.html#flush-tables-with-read-lock"><code class="literal">FLUSH TABLES WITH READ LOCK</code></a>) at
        the beginning of the dump. As soon as this lock has been
        acquired, the binary log coordinates are read and the lock is
        released. If long updating statements are running when the
        <a class="link" href="flush.html" title="13.7.7.3 FLUSH Syntax"><code class="literal">FLUSH</code></a> statement is issued, the
        MySQL server may get stalled until those statements finish.
        After that, the dump becomes lock free and does not disturb
        reads and writes on the tables. If the update statements that
        the MySQL server receives are short (in terms of execution
        time), the initial lock period should not be noticeable, even
        with many updates.
      </p><p>
        For point-in-time recovery (also known as
        <span class="quote">“<span class="quote">roll-forward,</span>”</span> when you need to restore an old
        backup and replay the changes that happened since that backup),
        it is often useful to rotate the binary log (see
        <a class="xref" href="binary-log.html" title="5.4.4 The Binary Log">Section 5.4.4, “The Binary Log”</a>) or at least know the binary log
        coordinates to which the dump corresponds:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal one-line"><code class="language-terminal">shell&gt; mysqldump --all-databases --master-data=2 &gt; all_databases.sql</code></pre><p>
        Or:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; mysqldump --all-databases --flush-logs --master-data=2
              &gt; all_databases.sql</code></pre><p>
        The <a class="link" href="mysqldump.html#option_mysqldump_master-data"><code class="option">--master-data</code></a> and
        <a class="link" href="mysqldump.html#option_mysqldump_single-transaction"><code class="option">--single-transaction</code></a> options
        can be used simultaneously, which provides a convenient way to
        make an online backup suitable for use prior to point-in-time
        recovery if tables are stored using the
        <code class="literal">InnoDB</code> storage engine.
      </p><p>
        For more information on making backups, see
        <a class="xref" href="backup-methods.html" title="7.2 Database Backup Methods">Section 7.2, “Database Backup Methods”</a>, and
        <a class="xref" href="backup-strategy-example.html" title="7.3 Example Backup and Recovery Strategy">Section 7.3, “Example Backup and Recovery Strategy”</a>.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            To select the effect of
            <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> except for some
            features, use the <code class="option">--skip</code> option for each
            feature. To disable extended inserts and memory buffering,
            use <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_extended-insert"><code class="option">--skip-extended-insert</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--skip-quick</code></a>.
            (Actually,
            <a class="link" href="mysqldump.html#option_mysqldump_extended-insert"><code class="option">--skip-extended-insert</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_quick"><code class="option">--skip-quick</code></a>
            is sufficient because
            <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> is on by default.)
          </p></li><li class="listitem"><p>
            

            To reverse <a class="link" href="mysqldump.html#option_mysqldump_opt"><code class="option">--opt</code></a> for all
            features except index disabling and table locking, use
            <a class="link" href="mysqldump.html#option_mysqldump_skip-opt"><code class="option">--skip-opt</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_disable-keys"><code class="option">--disable-keys</code></a>
            <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--lock-tables</code></a>.
</p></li></ul>
</div>
<h4><a name="mysqldump-restrictions"></a>Restrictions</h4>
<a class="indexterm" name="idm139663284960080"></a><a class="indexterm" name="idm139663284958592"></a><a class="indexterm" name="idm139663284957104"></a><p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> does not dump the
        <code class="literal">performance_schema</code> or <code class="literal">sys</code>
        schema by default. To dump any of these, name them explicitly on
        the command line. You can also name them with the
        <a class="link" href="mysqldump.html#option_mysqldump_databases"><code class="option">--databases</code></a> option. For
        <code class="literal">performance_schema</code>, also use the
        <a class="link" href="mysqldump.html#option_mysqldump_lock-tables"><code class="option">--skip-lock-tables</code></a>
        option.
      </p><p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> does not dump the
        <code class="literal">INFORMATION_SCHEMA</code> schema.
      </p><p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> does not dump
        <code class="literal">InnoDB</code> <a class="link" href="create-tablespace.html" title="13.1.21 CREATE TABLESPACE Syntax"><code class="literal">CREATE
        TABLESPACE</code></a> statements.
      </p><p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> does not dump the NDB Cluster
        <a class="link" href="mysql-cluster-ndbinfo.html" title="22.5.10 ndbinfo: The NDB Cluster Information Database"><code class="literal">ndbinfo</code></a> information database.
      </p><p>
        <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump</strong></span></a> includes statements to recreate the
        <code class="literal">general_log</code> and
        <code class="literal">slow_query_log</code> tables for dumps of the
        <code class="literal">mysql</code> database. Log table contents are not
        dumped.
      </p><p>
        If you encounter problems backing up views due to insufficient
        privileges, see <a class="xref" href="view-restrictions.html" title="C.5 Restrictions on Views">Section C.5, “Restrictions on Views”</a> for a
        workaround.
</p>
</div>
<br />
        </div>

                <div id="docs-in-page-nav-container">
            <div id="docs-in-page-nav">
                
    <a href="mysqlcheck.html"
        aria-label="Previous" title="Previous: mysqlcheck — A Table Maintenance Program"><span
        class="icon-chevron-left"></span> PREV</a> &nbsp;
<a href="index.html" aria-label="Start" title="Start"> HOME</a> &nbsp;
        <a aria-label="Up" href="programs-client.html" title="Up: MySQL Client Programs"> UP</a> &nbsp;
    <a href="mysqlimport.html" aria-label="Next"
        title="Next: mysqlimport — A Data Import Program">NEXT <span
        class="icon-chevron-right"></span></a>
            </div>
        </div>
        
         <div id="docs-body-extra">
             
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>
         </div>

              </div>
     </div>

</div>

<script>
$(function() {
    var doc = new $.doc({ 'mobile': $.browser.mobile, 'docId': 1, 'highlight': true });
});
</script>
    

            
        </div>
    </div>

    <footer class="collapsed">
        <div id="footer-bottom">
                                    <div id="footer-collapse">
                <a href="" id="expand-footer"
                    aria-label="Expand Footer"
                    title="Expand Footer"><span
                    class="icon-plus-square"></span></a>
            </div>
                        <div class="footer-contact">
                <div id="footer-contact-icon" style="display: none;">
                    <span class="icon-call-phone"></span>
                </div>
                <div id="footer-contact-numbers" style="display: none;">
                    <strong>Contact MySQL Sales</strong><br/>
                    USA/Canada: +1-866-221-0634 &nbsp;
                    (<a href="https://www.mysql.com/about/contact/phone/">More Countries &raquo;</a>)
                </div>
                <div id="footer-contact-copyright" style="display: inline-block;">
                    <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                    &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                </div>
            </div>
            <div class="social-icons">
                <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook-square"></span></a>
                <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter-square"></span></a>
                <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin-square"></span></a>
                <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube-square"></span></a>
            </div>
            <br class="clear" />
        </div>
        <div id="footer-links">

            <div id="footer-nav"></div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/products/">Products</a></li>
                    <li><a href="https://www.mysql.com/cloud/">Oracle MySQL Cloud Service</a></li>
                    <li><a href="https://www.mysql.com/products/enterprise/">MySQL Enterprise Edition</a></li>
                    <li><a href="https://www.mysql.com/products/standard/">MySQL Standard Edition</a></li>
                    <li><a href="https://www.mysql.com/products/classic/">MySQL Classic Edition</a></li>
                    <li><a href="https://www.mysql.com/products/cluster/">MySQL Cluster CGE</a></li>
                    <li><a href="https://www.mysql.com/oem/">MySQL Embedded (OEM/ISV)</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/services/">Services</a></li>
                    <li><a href="https://www.mysql.com/training/">Training</a></li>
                    <li><a href="https://www.mysql.com/certification/">Certification</a></li>
                    <li><a href="https://www.mysql.com/consulting/">Consulting</a></li>
                    <li><a href="https://www.mysql.com/support/">Support</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/downloads/">Downloads</a></li>
                    <li><a href="https://dev.mysql.com/downloads/mysql/">MySQL Community Server</a></li>
                    <li><a href="https://dev.mysql.com/downloads/cluster/">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/downloads/shell/">MySQL Shell</a></li>
                    <li><a href="https://dev.mysql.com/downloads/router/">MySQL Router</a></li>
                    <li><a href="https://dev.mysql.com/downloads/workbench/">MySQL Workbench</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/doc/">Documentation</a></li>
                    <li><a href="https://dev.mysql.com/doc/refman/en/">MySQL Reference Manual</a></li>
                    <li><a href="https://dev.mysql.com/doc/workbench/en/">MySQL Workbench</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-cluster.html">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-connectors.html">MySQL Connectors</a></li>
                    <li><a href="https://dev.mysql.com/doc/#topic">Topic Guides</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/about/">About MySQL</a></li>
                    <li><a href="https://www.mysql.com/about/contact/">Contact Us</a></li>
                                                            <li><a href="https://www.mysql.com/buy-mysql/">How to Buy</a></li>
                    <li><a href="https://www.mysql.com/partners/">Partners</a></li>
                    <li><a href="https://www.mysql.com/about/jobs/">Job Opportunities</a></li>
                    <li><a href="https://www.mysql.com/sitemap.html">Site Map</a></li>
                </ul>
            </div>

            
            <div id="footer-logo">
                <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                <div class="footer-legal-links">
                    <a href="https://www.mysql.com/about/legal/">Legal Policies</a> |
                    <a href="http://www.oracle.com/us/legal/privacy/index.htm">Your Privacy Rights</a> |
                    <a href="http://www.oracle.com/us/legal/terms/index.html">Terms of Use</a> |
                    <a href="http://www.oracle.com/us/legal/third-party-trademarks/index.html">Trademark Policy</a> |
                    <a href="http://www.oracle.com/technetwork/community/oca-486395.html">Contributor Agreement</a> |
                    <div id="teconsent" style="display: inline-block"><script async="async" type="text/javascript" src="js/notice.js" crossorigin=""></script></div>
                </div>
            </div>

        </div>
    </footer>
</div>

        <script src="js/s_code_remote.js"></script>

        
    
</body>
</html>
